slice instead of pop folders
This commit is contained in:
parent
04f687d6fc
commit
ebdde5925c
|
@ -15,11 +15,14 @@ import { FolderService } from 'jslib/abstractions/folder.service';
|
|||
export class FoldersComponent implements OnInit {
|
||||
folders: FolderView[];
|
||||
|
||||
constructor(private folderService: FolderService, private router: Router) {
|
||||
}
|
||||
constructor(private folderService: FolderService, private router: Router) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.folders = await this.folderService.getAllDecrypted();
|
||||
// Remove "No Folder"
|
||||
if (this.folders.length > 0) {
|
||||
this.folders = this.folders.slice(0, this.folders.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
folderSelected(folder: FolderView) {
|
||||
|
|
|
@ -137,9 +137,9 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
|||
async load() {
|
||||
await super.load(false);
|
||||
await this.loadCiphers();
|
||||
if (this.showNoFolderCiphers) {
|
||||
if (this.showNoFolderCiphers && this.folders.length > 0) {
|
||||
// Remove "No Folder" from folder listing
|
||||
this.folders.pop();
|
||||
this.folders = this.folders.slice(0, this.folders.length - 1);
|
||||
}
|
||||
|
||||
super.loaded = true;
|
||||
|
|
Loading…
Reference in New Issue