diff --git a/lib/open-files-pane-view.js b/lib/open-files-pane-view.js index 3876e9d..e612313 100755 --- a/lib/open-files-pane-view.js +++ b/lib/open-files-pane-view.js @@ -450,7 +450,7 @@ export default class OpenFilesPaneView { updateModifiedState(item, modified) { let entry = this.entryForItem(item); - if (entry) { + if (entry && entry.element) { entry.element.classList.toggle('modified', modified); } } @@ -467,7 +467,7 @@ export default class OpenFilesPaneView { if (item) { let entry = this.entryForItem(item); this.activeEntry ? this.activeEntry.classList.remove('selected') : undefined; - if (entry) { + if (entry && entry.element) { this.activeEntry = entry.element; entry.element.classList.add('selected'); }