From 87445230b193bf390f2439a3b32ecdebfb09411f Mon Sep 17 00:00:00 2001 From: ekhaled Date: Thu, 9 Aug 2018 10:39:51 +0100 Subject: [PATCH 1/2] fix resize listener bug for ios re: #1600 --- src/shared/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/dom.js b/src/shared/dom.js index 06b69ba2174d..d428e92f1c4a 100644 --- a/src/shared/dom.js +++ b/src/shared/dom.js @@ -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); } }; From b8e03dcfb837cd70a3219c611b0a763885a3612e Mon Sep 17 00:00:00 2001 From: ekhaled Date: Thu, 9 Aug 2018 10:41:47 +0100 Subject: [PATCH 2/2] update snapshot --- test/js/samples/bind-width-height/expected-bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/js/samples/bind-width-height/expected-bundle.js b/test/js/samples/bind-width-height/expected-bundle.js index 1f7abd7812b1..a7f8a3f6167d 100644 --- a/test/js/samples/bind-width-height/expected-bundle.js +++ b/test/js/samples/bind-width-height/expected-bundle.js @@ -43,7 +43,7 @@ function addResizeListener(element, fn) { return { cancel: () => { - win && win.removeEventListener('resize', fn); + win && win.removeEventListener && win.removeEventListener('resize', fn); element.removeChild(object); } };