From 3fd6dc3e0561f78072db3495e13c64e5a25c3409 Mon Sep 17 00:00:00 2001 From: yoanngueny Date: Wed, 30 Jun 2021 11:07:15 +0200 Subject: [PATCH] fix removeListener index --- src/core/Renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Renderer.ts b/src/core/Renderer.ts index cfd0516..397a330 100644 --- a/src/core/Renderer.ts +++ b/src/core/Renderer.ts @@ -238,7 +238,7 @@ export default defineComponent({ removeListener(type: string, cb: {(e?: any): void}) { const callbacks = this.getCallbacks(type) const index = callbacks.indexOf(cb) - if (index) callbacks.splice(index, 1) + if (index != -1) callbacks.splice(index, 1) }, getCallbacks(type: string) {