From 5c3204a69ce7fd8a6240aab2baeaffe784504643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E5=88=9A?= Date: Wed, 27 Oct 2021 16:17:29 +0800 Subject: [PATCH] fix: compatible with miniprogram "can't find variable removeEventListener" in miniprogram --- src/utils/web-preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/web-preset.ts b/src/utils/web-preset.ts index 06ba84081..56d346717 100644 --- a/src/utils/web-preset.ts +++ b/src/utils/web-preset.ts @@ -20,7 +20,7 @@ const onDocumentEvent = hasDocument ? document.addEventListener.bind(document) : noop const offWindowEvent = - hasWindow && window.removeEventListener ? removeEventListener : noop + hasWindow && window.removeEventListener ? window.removeEventListener : noop const offDocumentEvent = hasDocument ? document.removeEventListener.bind(document) : noop