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

Error "Cannot read property 'map' of null" when attempting to read empty object #1576

Closed
philrz opened this issue Apr 16, 2021 · 1 comment · Fixed by #1581
Closed

Error "Cannot read property 'map' of null" when attempting to read empty object #1576

philrz opened this issue Apr 16, 2021 · 1 comment · Fixed by #1581
Labels
bug Something isn't working
Milestone

Comments

@philrz
Copy link
Contributor

philrz commented Apr 16, 2021

Repro is with Brim commit 297df23 talking to zqd commit 232b748.

Consider the following NDJSON containing an empty object.

$ cat empty.ndjson 
{"emptyarray": {}}

When attempting to import it into Brim, I see the following error:

However, zq has no problem reading it.

$ zq -z empty.ndjson 
{emptyarray:{}}
@philrz philrz added the bug Something isn't working label Apr 16, 2021
@philrz philrz added this to the Data MVP0 milestone Apr 19, 2021
@philrz
Copy link
Contributor Author

philrz commented Apr 20, 2021

Verified in Brim commit 19dd931.

It's not much to look at, but now dragging the NDJSON into the app, there's no longer an error.

Verify.mp4

Notice that the name of the object is not visible in the Log Detail. I've added a note at #1245 (comment) to make sure we cover this when we address the wider problem of presenting complex data types in Brim.

Thanks @jameskerr!

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

Successfully merging a pull request may close this issue.

1 participant