mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
use correct context for resize handler - fixes #1898
This commit is contained in:
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…
Reference in New Issue
Block a user