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: prevent possible error on embedded component disconnect #20260

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

web-padawan
Copy link
Member

Description

This fixes the following error which sometimes occurs when switching between docs pages with Java examples:

Uncaught TypeError: Cannot read properties of undefined (reading 'disconnected')
    at ContextMenuPresentationWc.disconnectedCallback (:8000/vaadin/VAADIN/generated/flow/web-components/context-menu-presentation-wc.js:131:18)
    at removeChild (chunk-UXDD7MME.js:8456:26)

I'm not sure how to test this but it makes sense to check for object being defined before calling its methods anyway.

Type of change

  • Bugfix

Copy link

sonarcloud bot commented Oct 16, 2024

Copy link

Test Results

1 142 files  ± 0  1 142 suites  ±0   1h 25m 21s ⏱️ + 1m 29s
7 464 tests ± 0  7 414 ✅ ± 0  50 💤 ±0  0 ❌ ±0 
7 797 runs  +17  7 737 ✅ +17  60 💤 ±0  0 ❌ ±0 

Results for commit 7405061. ± Comparison against base commit 1937249.

@mshabarov mshabarov added the Contribution PRs coming from the community or external to the team label Oct 16, 2024
@mshabarov
Copy link
Contributor

@web-padawan thanks for this fix, we can probably skip the test. Which versions do need this? I guess 24.4 and 24.5 as docs are running using them?

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.alpha2 and is also targeting the upcoming stable 24.6.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants