提交 09de75fe 编写于 作者: I isidor

mainThreadWebview: activeEditor can be null

fixes #44546
上级 69169850
......@@ -483,7 +483,7 @@ export class MainThreadWebviews implements MainThreadWebviewsShape {
private onEditorsChanged() {
const activeEditor = this._editorService.getActiveEditor();
let newActiveWebview: { input: WebviewInput, handle: WebviewHandle } | undefined = undefined;
if (activeEditor.input instanceof WebviewInput) {
if (activeEditor && activeEditor.input instanceof WebviewInput) {
for (const handle of map.keys(this._webviews)) {
const input = this._webviews.get(handle);
if (input.matches(activeEditor.input)) {
......@@ -522,4 +522,4 @@ export class MainThreadWebviews implements MainThreadWebviewsShape {
WebviewEditor,
WebviewEditor.ID,
localize('webview.editor.label', "webview editor")),
[new SyncDescriptor(WebviewInput)]);
\ No newline at end of file
[new SyncDescriptor(WebviewInput)]);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册