break declaration grouping on non-declaration nodes (fixes #2022)

pull/2274/head
John Chesley 6 years ago
parent 86bee90d8a
commit d788bb9735

@ -865,7 +865,7 @@ export default class Component {
} }
} else { } else {
if (node.type !== 'ExportNamedDeclaration') { if (node.type !== 'ExportNamedDeclaration') {
if (!parent) current_group = null; if (!parent || parent.type === 'Program') current_group = null;
} }
} }
}, },

@ -1,11 +1,10 @@
<script> <script>
export let x; export let x, y
export let y;
$: y = x; $: y = x;
export let z; export let z;
$: z = x; $: z = x;
</script> </script>
<p>{x} {y} {z}</p> <p>{x} {y} {z}</p>
Loading…
Cancel
Save