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

null rootRecord when clicking primitive value in Inspector view #3109

Open
philrz opened this issue Jun 21, 2024 · 0 comments
Open

null rootRecord when clicking primitive value in Inspector view #3109

philrz opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@philrz
Copy link
Contributor

philrz commented Jun 21, 2024

Repro is with Zui commit b727a2e.

Steps shown in the attached video:

  1. Begin Preview & Load of the attached words.gz test data (after uncompressing)
  2. Select the Line data format
  3. Click Query Pool
  4. Click to switch to the Inspector view
  5. Click a value in the table

As shown in the attached video, this generates an Unhandled Runtime Error.

Repro.mp4

That error text:

Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'rootRecord')

Source
src/views/results-pane/inspector.tsx (64:34) @ rootRecord

  62 | valueProps={{
  63 |   onClick: (e, value, field) => {
> 64 |     const rootValue = field.rootRecord
     |                            ^
  65 |     dispatch(Selection.set({value, field, rootValue}))
  66 |     if (field && field instanceof zed.Field) {
  67 |       dispatch(viewLogDetail(field.rootRecord))
Call Stack
fn
src/views/inspector/templates/item.tsx (14:12)

FWIW,

  1. This error is not new. I could repro it in the last GA Zui release v1.7.0, for instance.
  2. This error is not visible to the user in a production build. It that case it goes only to DevTools.

So, probably not a high priority, but worth cleaning up at some point.

@philrz philrz added the bug Something isn't working label Jun 21, 2024
@jameskerr jameskerr self-assigned this Jul 2, 2024
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