diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index 38896b4546..89a575910f 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -106,6 +106,7 @@ export default class SlotWrapper extends Wrapper { let mount_before = block.builders.mount.toString(); block.builders.create.push_condition(`!${slot}`); + block.builders.claim.push_condition(`!${slot}`); block.builders.hydrate.push_condition(`!${slot}`); block.builders.mount.push_condition(`!${slot}`); block.builders.update.push_condition(`!${slot}`); @@ -118,6 +119,7 @@ export default class SlotWrapper extends Wrapper { block.event_listeners = listeners; block.builders.create.pop_condition(); + block.builders.claim.pop_condition(); block.builders.hydrate.pop_condition(); block.builders.mount.pop_condition(); block.builders.update.pop_condition(); diff --git a/test/hydration/samples/text-fallback/Nested.svelte b/test/hydration/samples/text-fallback/Nested.svelte new file mode 100644 index 0000000000..b5b69bdc97 --- /dev/null +++ b/test/hydration/samples/text-fallback/Nested.svelte @@ -0,0 +1,7 @@ +
+ + foo fallback + + + +
\ No newline at end of file diff --git a/test/hydration/samples/text-fallback/_after.html b/test/hydration/samples/text-fallback/_after.html new file mode 100644 index 0000000000..2d75e43c99 --- /dev/null +++ b/test/hydration/samples/text-fallback/_after.html @@ -0,0 +1,4 @@ +
+
foo override
+ default +
\ No newline at end of file diff --git a/test/hydration/samples/text-fallback/_before.html b/test/hydration/samples/text-fallback/_before.html new file mode 100644 index 0000000000..2d75e43c99 --- /dev/null +++ b/test/hydration/samples/text-fallback/_before.html @@ -0,0 +1,4 @@ +
+
foo override
+ default +
\ No newline at end of file diff --git a/test/hydration/samples/text-fallback/main.svelte b/test/hydration/samples/text-fallback/main.svelte new file mode 100644 index 0000000000..effe43254e --- /dev/null +++ b/test/hydration/samples/text-fallback/main.svelte @@ -0,0 +1,11 @@ + + + +
+ foo override +
+ + default +