Describe the bug
VS Code webview is flaky. Sometimes closing and opening the live preview will lead to Error: Webview is disposed.
To Reproduce
Steps to reproduce the behavior:
In VS Code, click "activate bricks".
Go to Figma, select any Figma component and generate code from it.
Close webview by clicking on the "X".
Go back to Figma, select any Figma component and generate code again.
VS Code will crash sometimes, and show this error:
[Extension Host] Error: Webview is disposed
at s.c (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:36185)
at s.get webview [as webview] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:35156)
at ZM (/Users/donovanso/.vscode/extensions/bricks.d2c-vscode-0.0.17/out/extension.js:977:213676)
at Sw.<anonymous> (/Users/donovanso/.vscode/extensions/bricks.d2c-vscode-0.0.17/out/extension.js:1041:5315)
Expected behavior
Webview should auto-open without error every time user generates code.
Describe the bug VS Code webview is flaky. Sometimes closing and opening the live preview will lead to
Error: Webview is disposed
.To Reproduce Steps to reproduce the behavior:
Expected behavior Webview should auto-open without error every time user generates code.