提交 d4f0c640 编写于 作者: I isidor

explorer: do not react on events if you are disposed

fixes #46565
上级 f5b569b6
......@@ -227,7 +227,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE] = activeFile.toString();
// Select file if input is inside workspace
if (this.isVisible() && this.contextService.isInsideWorkspace(activeFile)) {
if (this.isVisible() && !this.isDisposed && this.contextService.isInsideWorkspace(activeFile)) {
const selection = this.hasSingleSelection(activeFile);
if (!selection) {
this.select(activeFile).done(null, errors.onUnexpectedError);
......@@ -701,7 +701,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
}
private refreshFromEvent(newRoots: IWorkspaceFolder[] = []): void {
if (this.isVisible()) {
if (this.isVisible() && !this.isDisposed) {
this.explorerRefreshDelayer.trigger(() => {
if (!this.explorerViewer.getHighlight()) {
return this.doRefresh(newRoots.map(r => r.uri)).then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册