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;