Skip to content

fix: resolve developer tools generator error - #2785

Open
zspriggs wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
zspriggs:fix-generator-error
Open

zspriggs wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
zspriggs:fix-generator-error

Conversation

@zspriggs

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes

Proposed Changes

Adds a check to the change listener in index.ts so that it waits to generate the code output until the blocks that should be disabled are actually disabled.

Reason for Changes

This bug predates my changes but I found it while testing. Value blocks don't have header code generators (and they shouldn't). This normally isn't a problem since these blocks are disabled if they're not attached to the factory block. But, value blocks are very briefly top level and enabled when swapping one out for another.

Repro:

  1. Open the console on developer tools
  2. Drag a new color block directly from the toolbox into the factory block.
  3. Generator errors ensue

Test Coverage

Documentation

Additional Information

@zspriggs
zspriggs requested a review from a team as a code owner November 25, 2026 17:36
@zspriggs
zspriggs requested review from mikeharv and removed request for a team November 25, 2026 17:36

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants