Skip to content

Commit

Permalink
fix resize listener bug for ios re: sveltejs#1600
Browse files Browse the repository at this point in the history
  • Loading branch information
ekhaled committed Aug 9, 2018
1 parent 98212a0 commit 8744523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export function addResizeListener(element, fn) {

return {
cancel: () => {
win && win.removeEventListener('resize', fn);
win && win.removeEventListener && win.removeEventListener('resize', fn);
element.removeChild(object);
}
};
Expand Down

0 comments on commit 8744523

Please sign in to comment.