From c809d6ace0a0e967f4f38c60cd5b3f5ad1b1d1be Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Tue, 1 Oct 2024 15:59:53 -0500 Subject: [PATCH] refine event --- src/routes/chat/[agentId]/[conversationId]/chat-box.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte index db1f3bf..542a0c4 100644 --- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte @@ -223,7 +223,9 @@ }); function openFrame() { - window.parent.postMessage({ action: "open" }, "*"); + if (window.location != window.parent.location) { + window.parent.postMessage({ action: "open" }, "*"); + } } function resizeChatWindow() {