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:
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user