mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
Merge pull request #1760 from ekhaled/gh-1653-followup
followup fix to #1653
This commit is contained in:
commit
540cd05d42
@ -831,7 +831,7 @@ export default class ElementWrapper extends Wrapper {
|
||||
}
|
||||
|
||||
block.builders.destroy.addLine(
|
||||
`if (typeof ${name}.destroy === 'function') ${name}.destroy.call(#component);`
|
||||
`if (${name} && typeof ${name}.destroy === 'function') ${name}.destroy.call(#component);`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user