Skip to content

Commit

Permalink
Added notice in case of lack of redirect file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglev committed Aug 28, 2022
1 parent f38f4de commit 9383a84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,12 @@ const handleFilesWithModal = (
...new Set(relevantRedirectFiles.map((f) => f.originTFile.path)),
];

if (relevantRedirectFilesChunked.length === 0) {
new Notice(`No file redirects to the selected file.`);

return;
}

if (
[...files].length === 1 &&
relevantRedirectFilesChunked.length === 1
Expand Down

0 comments on commit 9383a84

Please sign in to comment.