-
Notifications
You must be signed in to change notification settings - Fork 109
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
Objects with no constructor
fails to render in tree mode
#391
Labels
bug
Something isn't working
Comments
Good point! There is a utility function |
Fixed now in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code to reproduce
Cause
Object.create(null)
creates an object with noconstructor
set.estimateSerializedSize
recurses json and tests if one is object withvalue.constructor.name === 'Object'
, throwingTypeError: Cannot read properties of undefined (reading 'name')
on such objects.svelte-jsoneditor/src/lib/utils/typeUtils.ts
Lines 9 to 13 in 278dac5
(Related issue: #321)
Parse function of json-bigint creates object with
Object.create(null)
, causing the error when used as a custom parser of jsoneditor.The text was updated successfully, but these errors were encountered: