Skip to content

Commit

Permalink
fix issue with saving query to collection
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Jul 4, 2024
1 parent 29c8c40 commit 6dd5f33
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 6dd5f33

Please sign in to comment.