Skip to content

Commit 769adf5

Browse files
committed
legacy mode fix
1 parent ffff25b commit 769adf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/repl/src/lib/Output/AstNode.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
$effect(() => {
3535
if (active && typeof value === 'object' && value !== null) {
3636
workspace.onselect((from, to) => {
37-
const nodes = value.type === 'Fragment' ? value.nodes : is_array ? value : [value];
37+
// legacy fragments have `children`
38+
const nodes =
39+
value.type === 'Fragment' ? value.nodes ?? value.children : is_array ? value : [value];
3840
3941
const start = nodes[0]?.start;
4042
const end = nodes[nodes.length - 1]?.end;

0 commit comments

Comments
 (0)