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

Fix render issue with block factory connection dropdown #4334

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

moniika
Copy link
Contributor

@moniika moniika commented Sep 29, 2020

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

https://groups.google.com/g/blockly/c/Jm4_bSpjNes/m/m6HXBZNEBwAJ

Proposed Changes

Adds a rendered check before calling render on block added in connectOutputShadow_.

Reason for Changes

The change in #4296 caused issues with the block factory connection dropdown field. The render call in connectOutputShadow_ is triggered when the validator is called in domToHeadless_ and throws an error.

Test Coverage

Tested on:

Additional Information

Previously an error was not thrown because initSvg was called before the dropdown field was processed. Reverting the PR would cause issues with variable models, but adding a rendered check before calling render seems reasonable.

@moniika moniika merged commit 311167b into google:develop Sep 29, 2020
alschmiedt pushed a commit to alschmiedt/blockly that referenced this pull request Sep 30, 2020
alschmiedt added a commit that referenced this pull request Sep 30, 2020
@moniika moniika deleted the block-factory-block branch September 30, 2020 22:27
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