Skip to content

Commit 8052cbe

Browse files
committed
Fix multiple iframes when using merge query flow
1 parent 8f98b87 commit 8052cbe

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/EmbedClientEx.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
SOFTWARE.
2424
2525
*/
26-
import type { ChattyHost, ChattyHostBuilder } from '@looker/chatty'
26+
import type {
27+
CallbackStore,
28+
ChattyHost,
29+
ChattyHostBuilder,
30+
} from '@looker/chatty'
2731
import type {
2832
CookielessRequestInit,
2933
EnvClientDialogEvent,
@@ -236,7 +240,10 @@ export class EmbedClientEx implements IEmbedClient {
236240

237241
private async createIframe(url: string, waitUntilLoaded?: boolean) {
238242
this._hostBuilder = this._sdk.chattyHostCreator(url)
239-
const handlers = { ...this._builder.handlers }
243+
const handlers: CallbackStore = {}
244+
for (const key in this._builder.handlers) {
245+
handlers[key] = [...this._builder.handlers[key]]
246+
}
240247
if (!handlers['session:expired']) {
241248
handlers['session:expired'] = []
242249
}

0 commit comments

Comments
 (0)