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: Fix unsafe cast in Input.setVisible(). #8695

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8694

Proposed Changes

This PR checks if the connection in Input.setVisible() is actually a rendered connection before assuming it is. If setVisible() was called while initing a block, connections may not have been fully set up and this would throw.

@gonfunko gonfunko requested a review from a team as a code owner December 13, 2024 18:00
@gonfunko gonfunko requested a review from cpcallen December 13, 2024 18:00
@github-actions github-actions bot added the PR: fix Fixes a bug label Dec 13, 2024
Copy link
Collaborator

@rachel-fenichel rachel-fenichel left a comment

Choose a reason for hiding this comment

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

The PR description says that this will throw if the connection is the wrong type, but it'll actually just silently fail. Please update to throw.

@gonfunko
Copy link
Contributor Author

gonfunko commented Jan 6, 2025

It said it would throw, ie that was the previous behavior, and it now no-ops aside from setting the visiblity status, which should be reflected when the block finishes initing.

@rachel-fenichel
Copy link
Collaborator

Ah, I misread. Thanks.

@gonfunko
Copy link
Contributor Author

gonfunko commented Jan 6, 2025

Ah, I misread. Thanks.

No worries, it was kind of an awkward phrasing on my part.

@gonfunko gonfunko merged commit 54ebfb7 into google:rc/v12.0.0 Jan 6, 2025
11 checks passed
@gonfunko gonfunko deleted the unsafe-cast branch January 6, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants