Skip to content

Commit a760a14

Browse files
committed
Don't apply nametag updates if model is disposed
1 parent ad75077 commit a760a14

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/app/src/app/overmind/effects/vscode/ModelsHandler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,10 @@ export class ModelsHandler {
431431
);
432432
this.userSelectionDecorations[decorationId].push(decoration);
433433
this.nameTagTimeouts[decorationId] = window.setTimeout(() => {
434-
// And now hide the nametag after 1.5s
435-
model.deltaDecorations([decoration], []);
434+
if (!model.isDisposed()) {
435+
// And now hide the nametag after 1.5s
436+
model.deltaDecorations([decoration], []);
437+
}
436438
}, 1500);
437439
}
438440
});

0 commit comments

Comments
 (0)