Skip to content

Fix bug with element disconnection#262

Merged
bendera merged 1 commit intovscode-elements:mainfrom
anthony-c-martin:main
Jan 22, 2025
Merged

Fix bug with element disconnection#262
bendera merged 1 commit intovscode-elements:mainfrom
anthony-c-martin:main

Conversation

@anthony-c-martin
Copy link
Copy Markdown
Contributor

Noticed when testing with https://testing-library.com/docs/react-testing-library/intro/ - test cleanup was causing the following error:

@vscode-bicep-ui/deploy-pane:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
@vscode-bicep-ui/deploy-pane:test: TypeError: Cannot read properties of undefined (reading 'unobserve')
@vscode-bicep-ui/deploy-pane:test:  ❯ VscodeTable.disconnectedCallback ../../node_modules/@vscode-elements/elements/src/vscode-table/vscode-table.ts:171:35
@vscode-bicep-ui/deploy-pane:test:  ❯ VscodeTable.invokeTheCallbackFunction ../../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26
@vscode-bicep-ui/deploy-pane:test:  ❯ invokeCEReactions ../../node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js:190:31
@vscode-bicep-ui/deploy-pane:test:  ❯ ceReactionsPostSteps ../../node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js:54:3
@vscode-bicep-ui/deploy-pane:test:  ❯ HTMLDivElement.removeChild ../../node_modules/jsdom/lib/jsdom/living/generated/Node.js:474:9
@vscode-bicep-ui/deploy-pane:test:  ❯ removeChildFromContainer ../../node_modules/react-dom/cjs/react-dom.development.js:11105:15
@vscode-bicep-ui/deploy-pane:test:  ❯ commitDeletionEffectsOnFiber ../../node_modules/react-dom/cjs/react-dom.development.js:24065:15
@vscode-bicep-ui/deploy-pane:test:  ❯ recursivelyTraverseDeletionEffects ../../node_modules/react-dom/cjs/react-dom.development.js:24028:5
@vscode-bicep-ui/deploy-pane:test:  ❯ commitDeletionEffectsOnFiber ../../node_modules/react-dom/cjs/react-dom.development.js:24157:9
@vscode-bicep-ui/deploy-pane:test:  ❯ commitDeletionEffects ../../node_modules/react-dom/cjs/react-dom.development.js:24015:5
@vscode-bicep-ui/deploy-pane:test: 
@vscode-bicep-ui/deploy-pane:test: This error originated in "src/components/App.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
@vscode-bicep-ui/deploy-pane:test: The latest test that might've caused the error is "what-ifs a deployment". It might mean one of the following:
@vscode-bicep-ui/deploy-pane:test: - The error was thrown, while Vitest was running this test.
@vscode-bicep-ui/deploy-pane:test: - If the error occurred after the test had been completed, this was the last documented test before it was thrown.

@bendera
Copy link
Copy Markdown
Member

bendera commented Jan 22, 2025

Awesome, thanks!!

@bendera bendera merged commit 40498a1 into vscode-elements:main Jan 22, 2025
@anthony-c-martin
Copy link
Copy Markdown
Contributor Author

@bendera thanks for the super speedy release!

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