From c9e815fdb88f0a0db48c20d578b8d5bf0557c485 Mon Sep 17 00:00:00 2001 From: John Chesley Date: Thu, 7 Mar 2019 00:25:32 -0500 Subject: [PATCH] create a new declaration for non-exported variables that follow an exported one (#2165) --- src/compile/Component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 1b843e9ca2..1f640e1873 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -839,6 +839,14 @@ export default class Component { current_group.declarators.push(declarator); } + + if (next) { + const next_variable = component.var_lookup.get(next.id.name) + if (next_variable && !next_variable.export_name) { + current_group = null + code.overwrite(declarator.end, next.start, ` ${node.kind} `); + } + } } else { current_group = null;