diff --git a/.changeset/witty-pugs-repeat.md b/.changeset/witty-pugs-repeat.md new file mode 100644 index 00000000000..6caf6ef3bfc --- /dev/null +++ b/.changeset/witty-pugs-repeat.md @@ -0,0 +1,5 @@ +--- +"@marko/runtime-tags": patch +--- + +Fix a placeholder that renders empty resuming as another node when it follows a node with text after it, or starts a section's content diff --git a/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.debug.js index e43a59fb662..d62423a8c1d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.debug.js @@ -29,7 +29,7 @@ var template_default = _template("__tests__/template.marko", (input) => { }, "__tests__/template.marko_0/onClick", $scope0_id) }, _content_resume("__tests__/template.marko_1*content", () => { const $scope1_id = _scope_id(); _scope_reason(); - _html(`${_escape(count)}${_el_resume($scope1_id, "#text/0")}`); + _html(`${_escape(count) || ""}${_el_resume($scope1_id, "#text/0")}`); _subscribe($count__closures, writeScope($scope1_id, { _: _scope_with_id($scope0_id) }, "__tests__/template.marko", "2:2")); _resume_branch($scope1_id); }, $scope0_id)); diff --git a/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.js index f0fedc65a00..b9148709c02 100644 --- a/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/__snapshots__/html.bundle.js @@ -28,7 +28,7 @@ var template_default = _template("a", (input) => { }, "a0", $scope0_id) }, _content_resume("a1", () => { const $scope1_id = _scope_id(); _scope_reason(); - _html(`${_escape(count)}${_el_resume($scope1_id, "a")}`); + _html(`${_escape(count) || ""}${_el_resume($scope1_id, "a")}`); _subscribe($count__closures, writeScope($scope1_id, { _: _scope_with_id($scope0_id) })); _resume_branch($scope1_id); }, $scope0_id)); diff --git a/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.debug.js index b8b152c1b7e..078072326ab 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.debug.js @@ -7,31 +7,31 @@ var template_default = _template("__tests__/template.marko", (input) => { _html(`${_el_resume($scope0_id, "#button/0")}
1 * ${_escape(n)}${_el_resume($scope0_id, "#text/1")} = `); _await($scope0_id, "#text/2", multiply(1, n), (result) => { const $scope1_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope1_id, "#text/0")}`); + _html(`${_escape(result) || ""}${_el_resume($scope1_id, "#text/0")}`); writeScope($scope1_id, {}, "__tests__/template.marko", "6:16"); }); _html(`
2 * ${_escape(n)}${_el_resume($scope0_id, "#text/3")} = `); _await($scope0_id, "#text/4", multiply(2, n), (result) => { const $scope2_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope2_id, "#text/0")}`); + _html(`${_escape(result) || ""}${_el_resume($scope2_id, "#text/0")}`); writeScope($scope2_id, {}, "__tests__/template.marko", "7:16"); }); _html(`
3 * ${_escape(n)}${_el_resume($scope0_id, "#text/5")} = `); _await($scope0_id, "#text/6", multiply(3, n), (result) => { const $scope3_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope3_id, "#text/0")}`); + _html(`${_escape(result) || ""}${_el_resume($scope3_id, "#text/0")}`); writeScope($scope3_id, {}, "__tests__/template.marko", "8:16"); }); _html(`
4 * ${_escape(n)}${_el_resume($scope0_id, "#text/7")} = `); _await($scope0_id, "#text/8", multiply(4, n), (result) => { const $scope4_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope4_id, "#text/0")}`); + _html(`${_escape(result) || ""}${_el_resume($scope4_id, "#text/0")}`); writeScope($scope4_id, {}, "__tests__/template.marko", "9:16"); }); _html(`
5 * ${_escape(n)}${_el_resume($scope0_id, "#text/9")} = `); _await($scope0_id, "#text/10", multiply(5, n), (result) => { const $scope5_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope5_id, "#text/0")}`); + _html(`${_escape(result) || ""}${_el_resume($scope5_id, "#text/0")}`); writeScope($scope5_id, {}, "__tests__/template.marko", "10:16"); }); _html("
"); diff --git a/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.js index ae83a8bad8e..ff60062ee11 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/__snapshots__/html.bundle.js @@ -7,31 +7,31 @@ var template_default = _template("a", (input) => { _html(`${_el_resume($scope0_id, "a")}1 * ${_escape(n)}${_el_resume($scope0_id, "b")} = `); _await($scope0_id, "c", multiply(1, n), (result) => { const $scope1_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope1_id, "a")}`); + _html(`${_escape(result) || ""}${_el_resume($scope1_id, "a")}`); writeScope($scope1_id, {}); }); _html(`
2 * ${_escape(n)}${_el_resume($scope0_id, "d")} = `); _await($scope0_id, "e", multiply(2, n), (result) => { const $scope2_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope2_id, "a")}`); + _html(`${_escape(result) || ""}${_el_resume($scope2_id, "a")}`); writeScope($scope2_id, {}); }); _html(`
3 * ${_escape(n)}${_el_resume($scope0_id, "f")} = `); _await($scope0_id, "g", multiply(3, n), (result) => { const $scope3_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope3_id, "a")}`); + _html(`${_escape(result) || ""}${_el_resume($scope3_id, "a")}`); writeScope($scope3_id, {}); }); _html(`
4 * ${_escape(n)}${_el_resume($scope0_id, "h")} = `); _await($scope0_id, "i", multiply(4, n), (result) => { const $scope4_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope4_id, "a")}`); + _html(`${_escape(result) || ""}${_el_resume($scope4_id, "a")}`); writeScope($scope4_id, {}); }); _html(`
5 * ${_escape(n)}${_el_resume($scope0_id, "j")} = `); _await($scope0_id, "k", multiply(5, n), (result) => { const $scope5_id = _scope_id(); - _html(`${_escape(result)}${_el_resume($scope5_id, "a")}`); + _html(`${_escape(result) || ""}${_el_resume($scope5_id, "a")}`); writeScope($scope5_id, {}); }); _html("
"); diff --git a/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.debug.js index 050bb348c88..222b7e4ff62 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.debug.js @@ -10,7 +10,7 @@ var template_default = _template("__tests__/template.marko", (input) => { _scope_reason(); _await($scope1_id, "#text/0", resolveAfter(clickCount), (value) => { const $scope3_id = _scope_id(); - _html(`${_escape(value)}${_el_resume($scope3_id, "#text/0")}`); + _html(`${_escape(value) || ""}${_el_resume($scope3_id, "#text/0")}`); writeScope($scope3_id, {}, "__tests__/template.marko", "7:4"); }); _subscribe($clickCount__closures, writeScope($scope1_id, { _: _scope_with_id($scope0_id) }, "__tests__/template.marko", "6:2")); diff --git a/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.js index 49b381320e0..a80a2fd9dd0 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/html.bundle.js @@ -10,7 +10,7 @@ var template_default = _template("a", (input) => { _scope_reason(); _await($scope1_id, "a", resolveAfter(clickCount), (value) => { const $scope3_id = _scope_id(); - _html(`${_escape(value)}${_el_resume($scope3_id, "a")}`); + _html(`${_escape(value) || ""}${_el_resume($scope3_id, "a")}`); writeScope($scope3_id, {}); }); _subscribe($clickCount__closures, writeScope($scope1_id, { _: _scope_with_id($scope0_id) })); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.debug.js index 950b5b226f2..d183772bd9b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.debug.js @@ -23,7 +23,7 @@ var template_default = _template("__tests__/template.marko", (input) => { $item = attrTags($item, { content: _content("__tests__/template.marko_1*content", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(a)}${_el_resume($scope1_id, "#text/0")}:${_escape(v)}${_el_resume($scope1_id, "#text/1")}`); + _html(`${_escape(a) || ""}${_el_resume($scope1_id, "#text/0")}:${_escape(v)}${_el_resume($scope1_id, "#text/1")}`); writeScope($scope1_id, {}, "__tests__/template.marko", "3:8"); }, $scope0_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.js index 6f8b0a9041b..c1864626ebe 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.bundle.js @@ -23,7 +23,7 @@ var template_default = _template("a", (input) => { $item = attrTags($item, { content: _content("a0", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(a)}${_el_resume($scope1_id, "a")}:${_escape(v)}${_el_resume($scope1_id, "b")}`); + _html(`${_escape(a) || ""}${_el_resume($scope1_id, "a")}:${_escape(v)}${_el_resume($scope1_id, "b")}`); writeScope($scope1_id, {}); }, $scope0_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.debug.js index 3b5965b5e64..d0ec455120a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.debug.js @@ -68,7 +68,7 @@ var template_default = _template("__tests__/template.marko", (input) => { content: _content_resume("__tests__/template.marko_3*content", () => { _scope_reason(); const $scope3_id = _scope_id(); - _html(`${_escape(row)}${_el_resume($scope3_id, "#text/0")}`); + _html(`${_escape(row) || ""}${_el_resume($scope3_id, "#text/0")}`); writeScope($scope3_id, {}, "__tests__/template.marko", "16:18"); }, $scope0_id) }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.js index 75e2055123d..b4260813ae6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.bundle.js @@ -65,7 +65,7 @@ var template_default = _template("a", (input) => { content: _content_resume("a2", () => { _scope_reason(); const $scope3_id = _scope_id(); - _html(`${_escape(row)}${_el_resume($scope3_id, "a")}`); + _html(`${_escape(row) || ""}${_el_resume($scope3_id, "a")}`); writeScope($scope3_id, {}); }, $scope0_id) }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.debug.js index bbfd209ee09..7ed29211bc4 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.debug.js @@ -23,7 +23,7 @@ var template_default = _template("__tests__/template.marko", (input) => { $item = attrTags($item, { content: _content("__tests__/template.marko_1*content", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(zzz)}${_el_resume($scope1_id, "#text/0")}`); + _html(`${_escape(zzz) || ""}${_el_resume($scope1_id, "#text/0")}`); writeScope($scope1_id, {}, "__tests__/template.marko", "3:5"); }, $scope0_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.js index e2396034735..d35719ce95d 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-closure/__snapshots__/html.bundle.js @@ -23,7 +23,7 @@ var template_default = _template("a", (input) => { $item = attrTags($item, { content: _content("a0", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(zzz)}${_el_resume($scope1_id, "a")}`); + _html(`${_escape(zzz) || ""}${_el_resume($scope1_id, "a")}`); writeScope($scope1_id, {}); }, $scope0_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.debug.js index 31781d74b1a..e0d9c049be9 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.debug.js @@ -27,7 +27,7 @@ var template_default = _template("__tests__/template.marko", (input) => { content: _content_resume("__tests__/template.marko_1*content", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape($foo)}${_el_resume($scope1_id, "#text/0")}`); + _html(`${_escape($foo) || ""}${_el_resume($scope1_id, "#text/0")}`); writeScope($scope1_id, {}, "__tests__/template.marko", "4:6"); }, $scope0_id) }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.js index ab05c0d88c5..a7c9eaed66a 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-event-handler-shadowed/__snapshots__/html.bundle.js @@ -27,7 +27,7 @@ var template_default = _template("a", (input) => { content: _content_resume("a1", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape($foo)}${_el_resume($scope1_id, "a")}`); + _html(`${_escape($foo) || ""}${_el_resume($scope1_id, "a")}`); writeScope($scope1_id, {}); }, $scope0_id) }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.debug.js index 71213c8f032..62576955d82 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.debug.js @@ -25,7 +25,7 @@ var template_default = _template("__tests__/template.marko", (input) => { $item = attrTags($item, { content: _content("__tests__/template.marko_1*content", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(item * mult)}${_el_resume($scope1_id, "#text/0")}`); + _html(`${_escape(item * mult) || ""}${_el_resume($scope1_id, "#text/0")}`); _subscribe($mult__closures, writeScope($scope1_id, { item, _: _scope_with_id($scope0_id) diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.js index f0b6719e93d..faf2dfac00e 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-for-loop-param-intersection-closure/__snapshots__/html.bundle.js @@ -25,7 +25,7 @@ var template_default = _template("a", (input) => { $item = attrTags($item, { content: _content("a0", () => { _scope_reason(); const $scope1_id = _scope_id(); - _html(`${_escape(item * mult)}${_el_resume($scope1_id, "a")}`); + _html(`${_escape(item * mult) || ""}${_el_resume($scope1_id, "a")}`); _subscribe($mult__closures, writeScope($scope1_id, { f: item, _: _scope_with_id($scope0_id) diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.debug.js index ef3963f82ea..3c0fed66835 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.debug.js @@ -4,7 +4,7 @@ var child_default = _template("__tests__/tags/child/index.marko", (input) => { const $scope0_id = _scope_id(); _for_of(input.scope, (s) => { const $scope1_id = _scope_id(); - _html(`${_escape(s.a)}${_el_resume($scope1_id, "#text/0", $sg__input_scope)}`); + _html(`${_escape(s.a) || _sep($sg__input_scope)}${_el_resume($scope1_id, "#text/0", $sg__input_scope)}`); $si__input_scope && writeScope($scope1_id, {}, "__tests__/tags/child/index.marko", "1:2"); }, 0, $scope0_id, "#text/0", $sg__input_scope, $sg__input_scope, $sg__input_scope, 0, 1); $si__input_scope && writeScope($scope0_id, {}, "__tests__/tags/child/index.marko", 0); diff --git a/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.js index a8c56109e9c..dc13909c347 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/at-tags-name-shadows-generated-uid/__snapshots__/html.bundle.js @@ -4,7 +4,7 @@ var child_default = _template("b", (input) => { const $scope0_id = _scope_id(); _for_of(input.scope, (s) => { const $scope1_id = _scope_id(); - _html(`${_escape(s.a)}${_el_resume($scope1_id, "a", $sg__input_scope)}`); + _html(`${_escape(s.a) || _sep($sg__input_scope)}${_el_resume($scope1_id, "a", $sg__input_scope)}`); $si__input_scope && writeScope($scope1_id, {}); }, 0, $scope0_id, "a", $sg__input_scope, $sg__input_scope, $sg__input_scope, 0, 1); $si__input_scope && writeScope($scope0_id, {}); diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.debug.js index 53b12d2cd19..29b5aaece02 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.debug.js @@ -19,7 +19,7 @@ var template_default = _template("__tests__/template.marko", (input) => { $item = attrTags($item, { content: _content("__tests__/template.marko_4*content", () => { _scope_reason(); const $scope4_id = _scope_id(); - _html(`${_escape(item.text)}${_el_resume($scope4_id, "#text/0")}`); + _html(`${_escape(item.text) || ""}${_el_resume($scope4_id, "#text/0")}`); writeScope($scope4_id, {}, "__tests__/template.marko", "11:14"); }, $scope2_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.js index 75fa62c7da6..9c5f88b800b 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/attr-tag-local-member-expression-closure/__snapshots__/html.bundle.js @@ -18,7 +18,7 @@ var template_default = _template("a", (input) => { $item = attrTags($item, { content: _content("a1", () => { _scope_reason(); const $scope4_id = _scope_id(); - _html(`${_escape(item.text)}${_el_resume($scope4_id, "a")}`); + _html(`${_escape(item.text) || ""}${_el_resume($scope4_id, "a")}`); writeScope($scope4_id, {}); }, $scope2_id) }); }); diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.debug.js index 6e466f68857..2ff3d89d5e6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.debug.js @@ -14,7 +14,7 @@ var template_default = _template("__tests__/template.marko", (input) => { _await($scope2_id, "#text/0", resolveAfter(0, 1), () => { const $scope3_id = _scope_id(); _script($scope3_id, "__tests__/template.marko_3_show#2/pending"); - _html(`${_escape(show)}${_el_resume($scope3_id, "#text/0")}`); + _html(`${_escape(show) || ""}${_el_resume($scope3_id, "#text/0")}`); _script($scope3_id, "__tests__/template.marko_3"); writeScope($scope3_id, { _: _scope_with_id($scope2_id) }, "__tests__/template.marko", "9:5"); _resume_branch($scope3_id); diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.js index 6c2c58afbec..074e6522ca6 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-cleanup/__snapshots__/html.bundle.js @@ -14,7 +14,7 @@ var template_default = _template("a", (input) => { _await($scope2_id, "a", resolveAfter(0, 1), () => { const $scope3_id = _scope_id(); _script($scope3_id, "a0"); - _html(`${_escape(show)}${_el_resume($scope3_id, "a")}`); + _html(`${_escape(show) || ""}${_el_resume($scope3_id, "a")}`); _script($scope3_id, "a1"); writeScope($scope3_id, { _: _scope_with_id($scope2_id) }); _resume_branch($scope3_id); diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.debug.js index b6f4533dc37..5e0b11eee11 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.debug.js @@ -10,7 +10,7 @@ var template_default = _template("__tests__/template.marko", (input) => { _await($scope1_id, "#text/0", resolveAfter(0, 4), () => { const $scope2_id = _scope_id(); _script($scope2_id, "__tests__/template.marko_2_value#1/pending"); - _html(`${_escape(value)}${_el_resume($scope2_id, "#text/0")}`); + _html(`${_escape(value) || ""}${_el_resume($scope2_id, "#text/0")}`); _script($scope2_id, "__tests__/template.marko_2_value#1"); writeScope($scope2_id, { _: _scope_with_id($scope1_id) }, "__tests__/template.marko", "6:3"); _resume_branch($scope2_id); diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.js b/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.js index 5bcf37250be..b18cfde64f7 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-closure-function/__snapshots__/html.bundle.js @@ -10,7 +10,7 @@ var template_default = _template("a", (input) => { _await($scope1_id, "a", resolveAfter(0, 4), () => { const $scope2_id = _scope_id(); _script($scope2_id, "a0"); - _html(`${_escape(value)}${_el_resume($scope2_id, "a")}`); + _html(`${_escape(value) || ""}${_el_resume($scope2_id, "a")}`); _script($scope2_id, "a1"); writeScope($scope2_id, { _: _scope_with_id($scope1_id) }); _resume_branch($scope2_id); diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-in-for/__snapshots__/html.bundle.debug.js b/packages/runtime-tags/src/__tests__/fixtures/await-in-for/__snapshots__/html.bundle.debug.js index a7707fb4078..00754eaec56 100644 --- a/packages/runtime-tags/src/__tests__/fixtures/await-in-for/__snapshots__/html.bundle.debug.js +++ b/packages/runtime-tags/src/__tests__/fixtures/await-in-for/__snapshots__/html.bundle.debug.js @@ -8,7 +8,7 @@ var template_default = _template("__tests__/template.marko", (input) => { _html("