chore: format

This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-07 20:14:32 -06:00
1 parent 144d8b1bb7
commit 3ceaa107ab
73 files changed
+482 -116

No files matched your search

+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++;
}