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

Attempt to output null record type causes "TypeError: Cannot read properties of null (reading 'length')" #2997

Closed
philrz opened this issue Feb 7, 2024 · 1 comment · Fixed by #2996
Assignees
Labels
bug Something isn't working

Comments

@philrz
Copy link
Contributor

philrz commented Feb 7, 2024

Repro is with Zui commit 205c88c. @mccanne found this issue while shaping some GitHub data for a presentation.

As shown in the attached video, attempting a yield typeof({}) produces a stack trace.

Repro.mp4

The full stack trace:

TypeError: Cannot read properties of null (reading 'length')
    at TypeRecordView.iterate (webpack-internal:///./src/app/features/inspector/views/type-record-view.ts:24:47)
    at iterate.next (<anonymous>)
    at TypeRecordView.renderLine (webpack-internal:///./src/app/features/inspector/views/container-view.ts:63:18)
    at TypeRecordView.render (webpack-internal:///./src/app/features/inspector/views/container-view.ts:98:29)
    at TypeRecordView.inspect (webpack-internal:///./src/app/features/inspector/views/container-view.ts:36:18)
    at Cell.inspect (webpack-internal:///./src/components/zed-table/cell.ts:56:19)
    at eval (webpack-internal:///./src/components/zed-table/cell-component.tsx:51:18)
    at startTransition (webpack-internal:///../../node_modules/react/cjs/react.development.js:2429:5)
    at eval (webpack-internal:///./src/components/zed-table/cell-component.tsx:50:63)
    at commitHookEffectListMount (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:22964:26)
    at commitPassiveMountOnFiber (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24697:13)
    at commitPassiveMountEffects_complete (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24661:9)
    at commitPassiveMountEffects_begin (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24648:7)
    at commitPassiveMountEffects (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:24636:3)
    at flushPassiveEffectsImpl (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:26843:3)
    at flushPassiveEffects (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:26796:14)
    at performSyncWorkOnRoot (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:25910:3)
    at flushSyncCallbacks (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:11982:22)
    at commitRootImpl (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:26771:3)
    at commitRoot (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:26512:5)
    at finishConcurrentRender (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:25815:9)
    at performConcurrentWorkOnRoot (webpack-internal:///../../node_modules/react-dom/cjs/react-dom.development.js:25643:7)
    at workLoop (webpack-internal:///../../node_modules/scheduler/cjs/scheduler.development.js:266:34)
    at flushWork (webpack-internal:///../../node_modules/scheduler/cjs/scheduler.development.js:239:14)
    at MessagePort.performWorkUntilDeadline (webpack-internal:///../../node_modules/scheduler/cjs/scheduler.development.js:533:21)
@philrz philrz added the bug Something isn't working label Feb 7, 2024
@philrz
Copy link
Contributor Author

philrz commented Feb 8, 2024

Verified in Zui commit 8088f5c.

As shown in the attached video, now a yield typeof({}) produces the expected output without stack trace.

Verify.mp4

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.

2 participants