From d788bb97351fa628da2057f86086ea357492ded6 Mon Sep 17 00:00:00 2001 From: John Chesley Date: Mon, 18 Mar 2019 21:33:42 -0400 Subject: [PATCH] break declaration grouping on non-declaration nodes (fixes #2022) --- src/compile/Component.ts | 2 +- .../reactive-values-exported/{main.html => main.svelte} | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) rename test/runtime/samples/reactive-values-exported/{main.html => main.svelte} (55%) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 77c516049e..30a06ca50b 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -865,7 +865,7 @@ export default class Component { } } else { if (node.type !== 'ExportNamedDeclaration') { - if (!parent) current_group = null; + if (!parent || parent.type === 'Program') current_group = null; } } }, diff --git a/test/runtime/samples/reactive-values-exported/main.html b/test/runtime/samples/reactive-values-exported/main.svelte similarity index 55% rename from test/runtime/samples/reactive-values-exported/main.html rename to test/runtime/samples/reactive-values-exported/main.svelte index 2a9e5dc8f5..169fb7fcd8 100644 --- a/test/runtime/samples/reactive-values-exported/main.html +++ b/test/runtime/samples/reactive-values-exported/main.svelte @@ -1,11 +1,10 @@ -

{x} {y} {z}

\ No newline at end of file +

{x} {y} {z}