From 980ec49711e903c7457582bcac16a63521a6d90a Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 4 Dec 2023 00:02:35 -0800 Subject: [PATCH] fix: modelfiles create --- src/routes/(app)/modelfiles/create/+page.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/(app)/modelfiles/create/+page.svelte b/src/routes/(app)/modelfiles/create/+page.svelte index 989f34c0..a49d0fd1 100644 --- a/src/routes/(app)/modelfiles/create/+page.svelte +++ b/src/routes/(app)/modelfiles/create/+page.svelte @@ -241,7 +241,10 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, ''); categories[category.toLowerCase()] = true; } }); - window.opener.postMessage('loaded', '*'); + + if (window.opener ?? false) { + window.opener.postMessage('loaded', '*'); + } });