mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
dont generate nonsensical code
This commit is contained in:
parent
87e2241928
commit
980ed66c09
@ -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…
Reference in New Issue
Block a user