Merge pull request #1760 from ekhaled/gh-1653-followup

followup fix to #1653
pull/1775/head
Rich Harris 6 years ago committed by GitHub
commit 540cd05d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save