maintain context for component events

pull/1367/head
Rich Harris 7 years ago
parent 331ef32198
commit 77a47020c4

@ -339,6 +339,7 @@ export default class Component extends Node {
this.handlers.forEach(handler => {
handler.var = block.getUniqueName(`${this.var}_${handler.name}`); // TODO this is hacky
handler.render(compiler, block);
if (handler.usesContext) block.maintainContext = true; // TODO is there a better place to put this?
});
if (this.name === 'svelte:component') {

Loading…
Cancel
Save