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

"Cannot read property 'type' of null" from passing blank name #1096

Closed
joshkel opened this issue Aug 26, 2020 · 5 comments
Closed

"Cannot read property 'type' of null" from passing blank name #1096

joshkel opened this issue Aug 26, 2020 · 5 comments
Labels

Comments

@joshkel
Copy link
Contributor

joshkel commented Aug 26, 2020

If a JSONEditor instance is constructed with an empty string as the name, then the constructor throws with the following error:

Cannot read property 'type' of null

Demo: https://codesandbox.io/s/jsoneditor-blank-name-9db9p

The error is thrown by this line of Node._updateDomField, although I haven't familiarized myself enough with JSONEditor to know what the correct fix is.

@josdejong josdejong added the bug label Aug 26, 2020
@josdejong
Copy link
Owner

Thanks for reporting this bug Josh! The line of the code that you're pointing can very well be the cause.

@josdejong
Copy link
Owner

That was indeed the cause. I've created a fix in b214915 (not yet published)

@joshkel
Copy link
Contributor Author

joshkel commented Aug 28, 2020

Thanks for the quick reply!

@josdejong
Copy link
Owner

The fix has been published now in v9.0.5. Sorry for the delay.

@joshkel
Copy link
Contributor Author

joshkel commented Sep 10, 2020

No problem. Thanks again.

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

No branches or pull requests

2 participants