Skip to content

Commit

Permalink
fix: catalog could be null
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Aug 30, 2022
1 parent ef666a4 commit 1145848
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rules/no-invalid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ function parseOption(
// If it matches the user's definition, don't use `catalog.json`.
if (option.useSchemastoreCatalog !== false) {
const catalog = loadJson(CATALOG_URL, context)
if (!catalog) {
return null
}

const schemas: {
name?: string
description?: string
Expand Down

0 comments on commit 1145848

Please sign in to comment.