Skip to content

Commit

Permalink
fix: issue with giving icon a file (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Oct 21, 2021
1 parent a981d12 commit ea65e27
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ export const addToDOM = (path: string, iconId: string): void => {
return;
}

const titleNode = node.querySelector('.nav-folder-title-content');
let titleNode = node.querySelector('.nav-folder-title-content');
if (!titleNode) {
console.error('element with title not found');
return;
titleNode = node.querySelector('.nav-file-title-content');

if (!titleNode) {
console.error('element with title not found');
return;
}
}

const iconNode = document.createElement('div');
Expand Down

0 comments on commit ea65e27

Please sign in to comment.