Skip to content

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

Closed
@thetruthger

Description

@thetruthger

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions