From 53c66b3542c200e664a8b95575821fa9023e2072 Mon Sep 17 00:00:00 2001 From: toanlamt <67050522+toanlamt@users.noreply.github.com> Date: Thu, 27 Apr 2023 11:20:27 +0700 Subject: [PATCH] Update src/addons/storagemanager/pages/course-storage/course-storage.ts Co-authored-by: Noel De Martin --- .../storagemanager/pages/course-storage/course-storage.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.ts b/src/addons/storagemanager/pages/course-storage/course-storage.ts index 920777f5f..445e02dfe 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.ts +++ b/src/addons/storagemanager/pages/course-storage/course-storage.ts @@ -494,12 +494,8 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy { CoreCourseHelper.calculateSectionsStatus(this.sections, this.courseId, false, false); // For delete all, reset all section sizes so icons are updated. - if (this.totalSize == 0) { - this.sections.map((section) => { - section.calculatingSize = true; - section.totalSize = 0; - section.calculatingSize = false; - }); + if (this.totalSize === 0) { + this.sections.map(section => section.totalSize = 0); } this.changeDetectorRef.markForCheck(); }