use correct context for resize handler - fixes #1898

pull/1909/head
Rich Harris 6 years ago
parent eefe120e70
commit 0b1d735e96

@ -494,7 +494,7 @@ export default class ElementWrapper extends Wrapper {
block.addVariable(resize_listener); block.addVariable(resize_listener);
block.builders.mount.addLine( block.builders.mount.addLine(
`${resize_listener} = @addResizeListener(${this.var}, ${callee});` `${resize_listener} = @addResizeListener(${this.var}, ${callee}.bind(${this.var}));`
); );
block.builders.destroy.addLine( block.builders.destroy.addLine(

Loading…
Cancel
Save