From aa5bff548db12d4e8332e0edbf1b524f19c3d430 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 21 Nov 2023 13:26:48 +0100 Subject: [PATCH] template fix --- web/components/widget_sandbox_iframe.ts | 2 +- web/syscalls/client_code_widget.ts | 1 - website/template/tasks/incoming.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/components/widget_sandbox_iframe.ts b/web/components/widget_sandbox_iframe.ts index ee0702e5..30991070 100644 --- a/web/components/widget_sandbox_iframe.ts +++ b/web/components/widget_sandbox_iframe.ts @@ -86,7 +86,7 @@ function claimIFrame(): PreloadedIFrame { export function broadcastReload() { for (const preloadedIframe of iframePool) { - if (preloadedIframe.used) { + if (preloadedIframe.used && preloadedIframe.iframe?.contentWindow) { // Send a message to the global object, which the iframe is listening to globalThis.dispatchEvent( new MessageEvent("message", { diff --git a/web/syscalls/client_code_widget.ts b/web/syscalls/client_code_widget.ts index 44689e54..dccc327a 100644 --- a/web/syscalls/client_code_widget.ts +++ b/web/syscalls/client_code_widget.ts @@ -1,4 +1,3 @@ -import { CodeWidgetContent } from "$sb/types.ts"; import { SysCallMapping } from "../../plugos/system.ts"; import { broadcastReload } from "../components/widget_sandbox_iframe.ts"; diff --git a/website/template/tasks/incoming.md b/website/template/tasks/incoming.md index c31b9f29..95056fd0 100644 --- a/website/template/tasks/incoming.md +++ b/website/template/tasks/incoming.md @@ -6,5 +6,5 @@ order: 2 --- ```query -task where name =~ /\[\[{{escapeRegexp @page.name}}\]\]/ where done = false render [[template/tasks/task]] +task where name =~ /\[\[{{escapeRegexp @page.name}}\]\]/ where done = false render [[template/task]] ``` \ No newline at end of file