LP1891355 Perm group refresh after changes
authorBill Erickson <berickxx@gmail.com>
Fri, 21 Aug 2020 15:14:02 +0000 (11:14 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 25 Aug 2020 21:04:27 +0000 (17:04 -0400)
Fixes an issue where the permission group interface failed to refresh
the page after an edit and data refetch was performed.  At issue was a
progress component which was not rendered/active at the time of refresh,
leading to a JS error, causeing the refresh to stop.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/admin/server/perm-group-tree.component.ts

index da97bca..c6fd131 100644 (file)
@@ -148,7 +148,9 @@ export class PermGroupTreeComponent implements OnInit {
         return this.pcrud.retrieveAll('pgpm', {},
             {fleshSelectors: true, authoritative: true})
         .pipe(map(m => {
-            this.loadProgress.increment();
+            if (this.loadProgress) {
+                this.loadProgress.increment();
+            }
             this.permMaps.push(m);
         })).toPromise();
     }