fix handle marking global variable as dependency

pull/3997/head
Tan Li Hau 5 years ago committed by Conduitry
parent 2f4d77115f
commit 59b886fcbf

@ -52,7 +52,9 @@ export default class Binding extends Node {
} else if (this.is_contextual) {
scope.dependencies_for_name.get(name).forEach(name => {
const variable = component.var_lookup.get(name);
if (variable) {
variable[this.expression.node.type === 'MemberExpression' ? 'mutated' : 'reassigned'] = true;
}
});
} else {
const variable = component.var_lookup.get(name);

@ -0,0 +1,3 @@
export default {
html: '<input type="text">'
};

@ -0,0 +1,9 @@
<script>
let data = {
a: {value:''}
}
</script>
{#each Object.values(data) as object}
<input type="text" bind:value={object.value} />
{/each}
Loading…
Cancel
Save