dont generate nonsensical code

pull/7738/head
Rich Harris 7 years ago
parent 86c2e847b2
commit 661bbe2c24

@ -431,13 +431,12 @@ export default class Component extends Node {
${this.ref && `#component.refs.${this.ref} = ${name};`}
} else {
${name} = null;
}
${this.ref && deindent`
else if (#component.refs.${this.ref} === ${name}) {
if (#component.refs.${this.ref} === ${name}) {
#component.refs.${this.ref} = null;
}`}
}
}
`);
if (updates.length) {

Loading…
Cancel
Save