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', '*'); + } });