Skip to content

Commit

Permalink
fix(Threading): 🐛 Increment duplicate note names was not slicing enou…
Browse files Browse the repository at this point in the history
…gh off the name each time
  • Loading branch information
SkepticMystic committed Jan 3, 2022
1 parent ed9b482 commit b0b56da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export default class BCPlugin extends Plugin {
let i = 1;
while (app.metadataCache.getFirstLinkpathDest(newBasename, "")) {
if (i === 1) newBasename += ` ${i}`;
else newBasename = newBasename.slice(0, -1) + ` ${i}`;
else newBasename = newBasename.slice(0, -2) + ` ${i}`;
i++;
}

Expand Down

0 comments on commit b0b56da

Please sign in to comment.