Skip to content

Setting the root-object to null in the editor results in an error #90

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

Closed
thetruthger opened this issue Jul 12, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@thetruthger
Copy link

Describe the bug
Setting the root-object to null in the editor results in an error which logs:

index.esm.js:1 
 Uncaught 
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at ge (index.esm.js:1:57689)
    at gi (react-dom.production.min.js:160:137)
    at xs (react-dom.production.min.js:196:258)
    at Sl (react-dom.production.min.js:291:88)
    at bu (react-dom.production.min.js:279:389)
    at vu (react-dom.production.min.js:279:320)
    at gu (react-dom.production.min.js:279:180)
    at au (react-dom.production.min.js:270:88)
    at lu (react-dom.production.min.js:272:300)

Expected behavior
The expected behavior would be to either allow the root element to be null because null is still valid JSON, or at least set it back to what it was before without breaking. :)

Screenshots
json_error

Online demo
The error occurs also in the public online demo of this tool.

@thetruthger thetruthger added the bug Something isn't working label Jul 12, 2024
@thetruthger thetruthger changed the title Bug report Setting the root-object to null in the editor results in an error Jul 12, 2024
@CarlosNZ
Copy link
Owner

Thanks for pointing this out, will fix in the next few days 👍

@CarlosNZ CarlosNZ self-assigned this Jul 14, 2024
@CarlosNZ
Copy link
Owner

Hi @thetruthger -- this should be fixed in v1.13.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants