Skip to content

Commit

Permalink
followup fix to sveltejs#1653
Browse files Browse the repository at this point in the history
  • Loading branch information
ekhaled committed Sep 26, 2018
1 parent b5140cd commit 3c4439c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compile/render-dom/wrappers/Element/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);`
);
});
}
Expand Down

0 comments on commit 3c4439c

Please sign in to comment.