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,12 +431,11 @@ 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}) {
|
||||
${this.ref && deindent`
|
||||
if (#component.refs.${this.ref} === ${name}) {
|
||||
#component.refs.${this.ref} = null;
|
||||
}`}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user