We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7276e5c commit 9e5f527Copy full SHA for 9e5f527
packages/svelte/src/internal/client/dom/hydration.js
@@ -62,14 +62,21 @@ function get_hydrate_nodes(node, insert_text = false) {
62
if (data === '[') {
63
depth += 1;
64
will_start = true;
65
- } else if (data === ']' && --depth === 0) {
66
- if (insert_text && nodes.length === 0) {
67
- var text = empty();
68
- nodes.push(text);
69
- current_node.before(text);
+ } else if (data === ']') {
+ if (!started) {
+ // TODO get rid of this — it exists because each blocks are doubly wrapped
+ return null;
70
}
71
72
- return nodes;
+ if (--depth === 0) {
+ if (insert_text && nodes.length === 0) {
73
+ var text = empty();
74
+ nodes.push(text);
75
+ current_node.before(text);
76
+ }
77
+
78
+ return nodes;
79
80
81
82
0 commit comments