From 278413b53cf23d329a3eab4dde690cb10722439d Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Fri, 4 Dec 2020 11:50:15 +0000 Subject: [PATCH] Fix snackbar service --- .../packages/core/src/shared/services/snackbar.service.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontend/packages/core/src/shared/services/snackbar.service.ts b/src/frontend/packages/core/src/shared/services/snackbar.service.ts index 5865b531b3..939a88c2f8 100644 --- a/src/frontend/packages/core/src/shared/services/snackbar.service.ts +++ b/src/frontend/packages/core/src/shared/services/snackbar.service.ts @@ -47,11 +47,7 @@ export class SnackBarService { } private trackSnackBar(snackBar: MatSnackBarRef) { - snackBar.afterOpened().pipe(first()).subscribe(() => { - this.snackBars.push(snackBar); - }); - snackBar.afterDismissed().pipe(first()).subscribe(() => { - this.snackBars.shift(); - }); + this.snackBars.push(snackBar); + snackBar.afterDismissed().pipe(first()).subscribe(() => this.snackBars.shift()); } }