From 9567d57bc5e9373a96a7f465e4a19b31d6448da1 Mon Sep 17 00:00:00 2001 From: dpiercey Date: Mon, 26 Feb 2024 12:07:43 -0700 Subject: [PATCH] fix: ensure node exists before clearing on error --- .../micro-frame-sse/ssr-404/renders.expected/loading.1.html | 2 +- .../micro-frame-sse/ssr-404/renders.expected/loading.3.html | 2 +- .../ssr-behind-reorder/renders.expected/loading.1.html | 2 +- .../ssr-behind-reorder/renders.expected/loading.3.html | 2 +- .../ssr-timeout/renders.expected/loading.2.html | 2 +- src/node_modules/@internal/micro-frame-component/node.marko | 6 +----- .../@internal/micro-frame-slot-component/node.marko | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.1.html index 5f89f6d..e6fb739 100644 --- a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.1.html +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.1.html @@ -15,6 +15,6 @@ id="GENERATED-2" > \ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.3.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.3.html index 03950f9..9c242c7 100644 --- a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.3.html +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-404/renders.expected/loading.3.html @@ -22,6 +22,6 @@ id="GENERATED-3" > \ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.1.html index 02965f0..879b9db 100644 --- a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.1.html +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.1.html @@ -26,7 +26,7 @@ id="GENERATED-5" > \ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.3.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.3.html index ea062bc..e50b87a 100644 --- a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.3.html +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-behind-reorder/renders.expected/loading.3.html @@ -33,7 +33,7 @@ id="GENERATED-6" > \ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-timeout/renders.expected/loading.2.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-timeout/renders.expected/loading.2.html index 9732bd4..e66122d 100644 --- a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-timeout/renders.expected/loading.2.html +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-timeout/renders.expected/loading.2.html @@ -18,6 +18,6 @@ test_html for slot_1

\ No newline at end of file diff --git a/src/node_modules/@internal/micro-frame-component/node.marko b/src/node_modules/@internal/micro-frame-component/node.marko index d207a9e..280f2c8 100644 --- a/src/node_modules/@internal/micro-frame-component/node.marko +++ b/src/node_modules/@internal/micro-frame-component/node.marko @@ -117,11 +117,7 @@ static async function fetchStream(input, out) { <@catch|err|> - + <${input.catch}(err)/> diff --git a/src/node_modules/@internal/micro-frame-slot-component/node.marko b/src/node_modules/@internal/micro-frame-slot-component/node.marko index 39c0642..ba7d801 100644 --- a/src/node_modules/@internal/micro-frame-slot-component/node.marko +++ b/src/node_modules/@internal/micro-frame-slot-component/node.marko @@ -24,7 +24,7 @@ $ { <@catch|e|> $ finishLoading && finishLoading(); - + <${input.catch}(e)/>