Skip to content

Commit

Permalink
fix(5019): make variable if hoisted if subscrible
Browse files Browse the repository at this point in the history
  • Loading branch information
skippednote committed Jun 23, 2020
1 parent 46d0d12 commit df790f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/compile/Component.ts
Expand Up @@ -1152,7 +1152,7 @@ export default class Component {
for (const specifier of specifiers) {
const variable = var_lookup.get(specifier.local.name);

if (!variable.mutated || var_lookup.get(`$${specifier.local.name}`)) {
if (!variable.mutated || variable.subscribable) {
variable.hoistable = true;
}
}
Expand Down

0 comments on commit df790f6

Please sign in to comment.