Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to configure whether we check attributes against the schema #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nlam-atlassian
Copy link
Collaborator

@nlam-atlassian nlam-atlassian commented Oct 22, 2024

Not sure why checkAttrs was added to Node.toJSON in the original TS code, especially since Node.toJSON doesn't check if the node structure is correct anyway.

Since we want to be able to parse JSON and render it, even if it doesn't conform to the schema, I've added a flag to toggle whether we should call checkAttrs or not.

Context: checkAttrs throws a RangeException if it sees an attribute that it isn't expecting based on the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant