Skip to content

Commit 7b849f2

Browse files
authored
fix: catalog could be null (#174)
1 parent ef666a4 commit 7b849f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rules/no-invalid.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ function parseOption(
9090
// If it matches the user's definition, don't use `catalog.json`.
9191
if (option.useSchemastoreCatalog !== false) {
9292
const catalog = loadJson(CATALOG_URL, context)
93+
if (!catalog) {
94+
return null
95+
}
96+
9397
const schemas: {
9498
name?: string
9599
description?: string

0 commit comments

Comments
 (0)