Skip to content

Commit

Permalink
Merge pull request #1610 from ekhaled/gh-1600
Browse files Browse the repository at this point in the history
closes #1600
  • Loading branch information
Rich-Harris authored Jul 24, 2018
2 parents c692cd6 + 259f77d commit 264d65d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shared/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function addResizeListener(element, fn) {

return {
cancel: () => {
win.removeEventListener('resize', fn);
win && win.removeEventListener('resize', fn);
element.removeChild(object);
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/js/samples/bind-width-height/expected-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function addResizeListener(element, fn) {

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

0 comments on commit 264d65d

Please sign in to comment.