提交 fe81ed49 编写于 作者: M Matt Bierner

Fix null deref on webview container

Fixes #45807
上级 151ba0b0
......@@ -184,8 +184,8 @@ export class WebviewInput extends EditorInput {
public releaseWebview(owner: any) {
if (this._webviewOwner === owner) {
this._webviewOwner = undefined;
if (this._options.retainContextWhenHidden) {
this.container.style.visibility = 'hidden';
if (this._options.retainContextWhenHidden && this._container) {
this._container.style.visibility = 'hidden';
} else {
this.disposeWebview();
}
......@@ -202,7 +202,10 @@ export class WebviewInput extends EditorInput {
this._webviewDisposables = dispose(this._webviewDisposables);
this._webviewOwner = undefined;
this.container.style.visibility = 'hidden';
if (this._container) {
this._container.style.visibility = 'hidden';
}
this._currentWebviewHtml = '';
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册