pull/10904/head
Rich Harris 2 years ago
parent 7276e5c8c1
commit 9e5f527cd6

@ -62,7 +62,13 @@ function get_hydrate_nodes(node, insert_text = false) {
if (data === '[') {
depth += 1;
will_start = true;
} else if (data === ']' && --depth === 0) {
} else if (data === ']') {
if (!started) {
// TODO get rid of this — it exists because each blocks are doubly wrapped
return null;
}
if (--depth === 0) {
if (insert_text && nodes.length === 0) {
var text = empty();
nodes.push(text);
@ -72,6 +78,7 @@ function get_hydrate_nodes(node, insert_text = false) {
return nodes;
}
}
}
if (started) {
nodes.push(current_node);

Loading…
Cancel
Save