LP1807461 Admin page avoid errors on dialog dismissal
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / share / admin-page / admin-page.component.ts
index cfb01e5..cd6e706 100644 (file)
@@ -180,9 +180,11 @@ export class AdminPageComponent implements OnInit {
                         .then(str => this.toast.success(str));
                     this.grid.reload();
                 },
-                err => {
-                    this.createErrString.current()
-                        .then(str => this.toast.danger(str));
+                rejection => {
+                    if (!rejection.dismissed) {
+                        this.createErrString.current()
+                            .then(str => this.toast.danger(str));
+                    }
                 }
             );
         };
@@ -326,9 +328,11 @@ export class AdminPageComponent implements OnInit {
                     .then(str => this.toast.success(str));
                 this.grid.reload();
             },
-            err => {
-                this.updateFailedString.current()
-                    .then(str => this.toast.danger(str));
+            rejection => {
+                if (!rejection.dismissed) {
+                    this.updateFailedString.current()
+                        .then(str => this.toast.danger(str));
+                }
             }
         );
     }