fix conditional logic

This commit is contained in:
Jesse Lucas 2020-03-24 16:45:54 -04:00
parent f342a2a54b
commit 15c2556e06

View File

@ -18,11 +18,10 @@ export class FolderService {
getFolderStatusInOrder(observer: Subscriber<Folder>, startIndex: number) { getFolderStatusInOrder(observer: Subscriber<Folder>, startIndex: number) {
// Return if there aren't any folders at the index // Return if there aren't any folders at the index
if (startIndex >= (this.folders.length - 1)) { if (startIndex >= (this.folders.length)) {
observer.complete(); observer.complete();
return; return;
} }
const folder: Folder = this.folders[startIndex]; const folder: Folder = this.folders[startIndex];
startIndex = startIndex + 1; startIndex = startIndex + 1;
this.dbStatusService.getFolderStatus(folder.id).subscribe( this.dbStatusService.getFolderStatus(folder.id).subscribe(