1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-20 03:13:55 +00:00

[PM-30122] allow no folders inside browser folder settings (#19041)

This commit is contained in:
Jason Ng
2026-02-18 16:22:50 -05:00
committed by GitHub
parent 6dea7504a6
commit bca2ebaca9
2 changed files with 2 additions and 8 deletions

View File

@@ -94,11 +94,12 @@ describe("FoldersComponent", () => {
fixture.detectChanges();
});
it("removes the last option in the folder array", (done) => {
it("should show all folders", (done) => {
component.folders$.subscribe((folders) => {
expect(folders).toEqual([
{ id: "1", name: "Folder 1" },
{ id: "2", name: "Folder 2" },
{ id: "0", name: "No Folder" },
]);
done();
});

View File

@@ -53,13 +53,6 @@ export class FoldersComponent {
this.folders$ = this.activeUserId$.pipe(
filter((userId): userId is UserId => userId !== null),
switchMap((userId) => this.folderService.folderViews$(userId)),
map((folders) => {
// Remove the last folder, which is the "no folder" option folder
if (folders.length > 0) {
return folders.slice(0, folders.length - 1);
}
return folders;
}),
);
}