Skip to content

Commit

Permalink
add nil check on type check executor
Browse files Browse the repository at this point in the history
  • Loading branch information
punit-kulal committed Oct 3, 2023
1 parent 63c8fa8 commit 4741766
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions formats/json/compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func CheckAdditionalProperties(schema *jsonschema.Schema, diffs *compatibilityEr

func TypeCheckExecutor(spec TypeCheckSpec) SchemaCompareCheck {
return func(prevSchema, currSchema *jsonschema.Schema, diffs *compatibilityErr) {
if prevSchema == nil || currSchema == nil {
return
}
prevTypes := prevSchema.Types
currTypes := currSchema.Types
err := elementsMatch(prevTypes, currTypes)
Expand Down

0 comments on commit 4741766

Please sign in to comment.