dont generate nonsensical code

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

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

Loading…
Cancel
Save