Skip to content

Commit

Permalink
Committing classList null fix
Browse files Browse the repository at this point in the history
From oriolmirosa#19 asdf23 and pauljherring.
  • Loading branch information
Pysis868 committed Mar 13, 2023
1 parent 5f4a89e commit 3580398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/open-files-pane-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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');
}
Expand Down

0 comments on commit 3580398

Please sign in to comment.