From 6dd5f3319967a3bb9129599778c320453d1a23b8 Mon Sep 17 00:00:00 2001 From: Samuel Imolorhe Date: Thu, 4 Jul 2024 02:45:51 +0200 Subject: [PATCH] fix issue with saving query to collection --- .../src/app/modules/altair/services/window.service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/altair-app/src/app/modules/altair/services/window.service.ts b/packages/altair-app/src/app/modules/altair/services/window.service.ts index e7348f925d..4f1e4b0047 100644 --- a/packages/altair-app/src/app/modules/altair/services/window.service.ts +++ b/packages/altair-app/src/app/modules/altair/services/window.service.ts @@ -268,7 +268,6 @@ export class WindowService { updateWindowState$(windowId: string, data: ExportWindowState) { return this.getWindowState(windowId).pipe( - take(1), tap((window) => { this.store.dispatch( new layoutActions.SetWindowNameAction(windowId, { @@ -508,7 +507,6 @@ export class WindowService { // Validate that query is ACTUALLY in an existing collection this.getWindowState(windowId) .pipe( - take(1), switchMap((data) => { if (data?.layout.collectionId && data?.layout.windowIdInCollection) { return from( @@ -556,7 +554,7 @@ export class WindowService { } private getWindowState(windowId: string) { - return this.store.pipe(select(fromRoot.selectWindowState(windowId))); + return this.store.pipe(select(fromRoot.selectWindowState(windowId)), take(1)); } private cleanupWindow(windowId: string) { this.store.dispatch(new streamActions.StopStreamClientAction(windowId));