Skip to content

Commit 64988df

Browse files
authored
Fix plotly hanging while rendering bug (#7359)
Addresses #6033 The problem that was occurring was that the webview was attempted to be opened with no extension. However, the extension object sent over looked like `{id: undefined}`, so when it was being unpacked by the webview class it checked if the id field exists, and then once it sees it _does_ it assumes we have a full id object, which we don't. Thus it was trying to pick off value from `undefined`. This PR simply adds one more optional chaining step for the accessing of `value` on the id. This fixed the error in my setup. ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - Fix plotly hanging while rendering bug. ### QA Notes - Run the following code: ```python import plotly.express as px fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2]) fig ``` and you should get a plot and a nice and not frozen console.
1 parent 148b9de commit 64988df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/webview/browser/webviewElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
478478
id: this.id,
479479
origin: this.origin,
480480
swVersion: String(this._expectedServiceWorkerVersion),
481-
extensionId: extension?.id.value ?? '',
481+
extensionId: extension?.id?.value ?? '',
482482
platform: this.platform,
483483
'vscode-resource-base-authority': webviewRootResourceAuthority,
484484
parentOrigin: targetWindow.origin,

0 commit comments

Comments
 (0)