Skip to content

fix(react-core): stop interpreting an empty bundle after the last series item - #1931

Open
SAY-5 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
SAY-5:fix/1813-series-empty-bundle
Open

SAY-5 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
SAY-5:fix/1813-series-empty-bundle

Conversation

@SAY-5

@SAY-5 SAY-5 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #1813

After the last item currentItemIndex runs past the end of target.items, so the series renderer passed '' to useInterpretedInstrument, which interpreted it and logged Cannot read properties of undefined (reading 'kind'). As suggested in the triage comment, the hook now takes null | string and returns early for null, the renderer passes scalarBundle ?? null, and the interpreter is left alone. Tests cover the hook with null, a completed series never interpreting '', and the skipProgress e2e spec logging no reading 'kind' error (I ran the two unit test files with and without the fix, but not the e2e suite locally).

…ies item

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5
SAY-5 requested a review from joshunrau as a code owner November 19, 2026 15:20
@github-actions github-actions Bot added Status: CI Failing Automated: a check failed; the author fixes it Status: Needs Rebase Automated: conflicts with main; the author rebases and removed Status: CI Failing Automated: a check failed; the author fixes it labels Nov 19, 2026

@joshunrau joshunrau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I can't review it yet, for two reasons:

  1. The lint-and-test CI check fails. Every error is in lint:root, in apps/outreach/src/lib/blog.ts and apps/outreach/src/content/config.ts, and this PR touches neither file. The branch is based on an older main (dd58751), so the errors most likely come from that stale base rather than from your change.
  2. The branch conflicts with main.

Rebasing onto the current main (or merging it in) and resolving the conflicts should fix both. Once CI is green I'll review it.

Reviewed at commit aee3601.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs Rebase Automated: conflicts with main; the author rebases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completing a series instrument logs a TypeError "Cannot read properties of undefined (reading 'kind')"

2 participants