chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-03-07 20:14:32 -06:00
parent 144d8b1bb7
commit 3ceaa107ab
73 changed files with 482 additions and 116 deletions
+2 -6
View File
@@ -150,16 +150,12 @@
}
// Check for duplicate names in the same parent
const siblings = Object.values(folders).filter(
(folder) => folder.parent_id === parent_id
);
const siblings = Object.values(folders).filter((folder) => folder.parent_id === parent_id);
if (siblings.find((folder) => folder.name.toLowerCase() === name.toLowerCase())) {
// If a folder with the same name already exists, append a number to the name
let i = 1;
while (
siblings.find(
(folder) => folder.name.toLowerCase() === `${name} ${i}`.toLowerCase()
)
siblings.find((folder) => folder.name.toLowerCase() === `${name} ${i}`.toLowerCase())
) {
i++;
}