Skip to content

Commit

Permalink
fix: compatible with miniprogram (#1595)
Browse files Browse the repository at this point in the history
"can't find variable removeEventListener" in miniprogram

Co-authored-by: 最刚 <zhaomengfan>
  • Loading branch information
zhaomengfan authored Oct 27, 2021
1 parent 17b8f93 commit 62ad926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/web-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62ad926

Please sign in to comment.