fix: remove metadata from legacy AST

Besides being private API that shouldn't be exposed, they caused our AST explorer on the Svelte site to traverse endlessly

fixes https://github.com/sveltejs/svelte.dev/issues/480
pull/13927/head
Simon Holthausen 2 years ago
parent feb2d85f46
commit 1399b81583

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: remove metadata from legacy AST

@ -204,7 +204,9 @@ export function convert(source, ast) {
ignores: extract_svelte_ignore(node.start, node.data, false)
};
},
ComplexSelector(node) {
ComplexSelector(node, { next }) {
next(); // delete inner metadata/parent properties
const children = [];
for (const child of node.children) {

Loading…
Cancel
Save