From f9b15bef529bbffafd773fbef04351e4396e9ec8 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sun, 5 Dec 2021 10:17:42 +0100 Subject: [PATCH] fix(idle): maybe fix destructure issue #1684 --- src/app/features/idle/store/idle.effects.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/features/idle/store/idle.effects.ts b/src/app/features/idle/store/idle.effects.ts index 0b4604c399..037960d9f4 100644 --- a/src/app/features/idle/store/idle.effects.ts +++ b/src/app/features/idle/store/idle.effects.ts @@ -19,6 +19,7 @@ import { } from './idle.actions'; import { distinctUntilChanged, + exhaustMap, filter, first, map, @@ -144,7 +145,8 @@ export class IdleEffects { ofType(openIdleDialog), filter(() => !this._isDialogOpen), tap(() => (this._isDialogOpen = true)), - switchMap(({ enabledSimpleStopWatchCounters, lastCurrentTaskId }) => + // use exhaustMap to prevent opening up multiple dialogs + exhaustMap(({ enabledSimpleStopWatchCounters, lastCurrentTaskId }) => this._matDialog .open(DialogIdleComponent, { restoreFocus: true,