mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
parent
69169850e3
commit
09de75fe5d
|
@ -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)]);
|
||||
[new SyncDescriptor(WebviewInput)]);
|
||||
|
|
Loading…
Reference in a new issue