From 357d56cc81131d4822f155e6af7ca4d86e1d62e7 Mon Sep 17 00:00:00 2001 From: changwoolab Date: Thu, 23 May 2024 15:41:53 +0900 Subject: [PATCH 1/2] fix: add missed events when removing listeners --- src/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 5c04965..524a236 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -312,6 +312,8 @@ export class Pusher { this.pusherEventEmitter.removeAllListeners( PusherEventName.ON_MEMBER_REMOVED ); + this.pusherEventEmitter.removeAllListeners(PusherEventName.ON_CONNECTION_STATE_CHANGE); + this.pusherEventEmitter.removeAllListeners(PusherEventName.ON_SUBSCRIPTION_ERROR); } public async reset() { From c965c9a2eb1632400f58ea63954cad329ab5422f Mon Sep 17 00:00:00 2001 From: changwoolab Date: Tue, 28 May 2024 10:19:58 +0900 Subject: [PATCH 2/2] fix: lint --- src/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 524a236..fd688bd 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -312,8 +312,12 @@ export class Pusher { this.pusherEventEmitter.removeAllListeners( PusherEventName.ON_MEMBER_REMOVED ); - this.pusherEventEmitter.removeAllListeners(PusherEventName.ON_CONNECTION_STATE_CHANGE); - this.pusherEventEmitter.removeAllListeners(PusherEventName.ON_SUBSCRIPTION_ERROR); + this.pusherEventEmitter.removeAllListeners( + PusherEventName.ON_CONNECTION_STATE_CHANGE + ); + this.pusherEventEmitter.removeAllListeners( + PusherEventName.ON_SUBSCRIPTION_ERROR + ); } public async reset() {