-
-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
Following #827 , which added null and boolean tests to required to guard against the JavaScript typeof null === "object" bug, I noticed minProperties and propertyNames have the same gap.
Both are object-only keywords. A buggy JS implementation checking typeof data === "object" would incorrectly apply them to null. The existing 12 test doesn't catch this since typeof 12 === "number" correctly bypasses that check — only null triggers the false positive.
Proposed addition to both files:
{ "description": "ignores null", "data": null, "valid": true }, { "description": "ignores booleans", "data": true, "valid": true }
Happy to submit a PR across all affected drafts if this is accepted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels