1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

[PM-8050] Deleting one folder deletes all other folders (#10165)

* removed the use of deletepromise from folder edit dialog on web

* resolved fix me

* return folders if folder is not found with folder id
This commit is contained in:
SmithThe4th
2024-07-18 18:28:25 -04:00
committed by GitHub
parent 56f5dba444
commit c27657eb82
3 changed files with 16 additions and 17 deletions

View File

@@ -137,16 +137,14 @@ export class FolderService implements InternalFolderServiceAbstraction {
return;
}
if (typeof id === "string") {
if (folders[id] == null) {
return;
const folderIdsToDelete = Array.isArray(id) ? id : [id];
folderIdsToDelete.forEach((id) => {
if (folders[id] != null) {
delete folders[id];
}
delete folders[id];
} else {
(id as string[]).forEach((i) => {
delete folders[i];
});
}
});
return folders;
});