Skip to content

Commit fd4e8cf

Browse files
committed
use window self top to detect iframe
1 parent 7decc9f commit fd4e8cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
}
382382
383383
function initChatView() {
384-
isFrame = window.location != window.parent.location;
384+
isFrame = window.self != window.top;
385385
mode = $page.url.searchParams.get('mode') || '';
386386
// initial condition
387387
isPersistLogClosed = false;

0 commit comments

Comments
 (0)