Skip to content

Commit

Permalink
do not hoist declaration if it is exported (fixes sveltejs#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
jches committed Apr 2, 2019
1 parent 1140fdf commit cfc1a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compile/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ export default class Component {

const v = this.var_lookup.get(d.id.name)
if (v.reassigned) return false
if (v.export_name && v.export_name !== v.name) return false
if (v.export_name) return false

if (this.var_lookup.get(d.id.name).reassigned) return false;
if (this.vars.find(variable => variable.name === d.id.name && variable.module)) return false;
Expand Down

0 comments on commit cfc1a40

Please sign in to comment.