Skip to content

Commit

Permalink
fix: issue with frontmatter property type (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Nov 3, 2023
1 parent a8f08fe commit 6b81fe4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,13 @@ export default class IconFolderPlugin extends Plugin {
return;
}

if (typeof newIconName !== 'string') {
new Notice(
`[${config.PLUGIN_NAME}] Frontmatter property type \`icon\` has to be of type \`text\`.`,
);
return;
}

const cachedIcon = IconCache.getInstance().get(file.path);
if (newIconName === cachedIcon?.iconNameWithPrefix) {
return;
Expand Down

0 comments on commit 6b81fe4

Please sign in to comment.