Skip to content

Commit f30ef15

Browse files
committed
remove event listeners
1 parent 00a64c8 commit f30ef15

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

libs/event-emitter-helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const EventEmitterHelper = {
6565
}))
6666
},
6767
removeEventListener(type, handler) {
68+
NativeAppEventEmitter.removeAllListeners(type)
6869
if (!_eventHandlers[type].has(handler)) {
6970
return
7071
}

libs/twilio-voice-client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const TwilioVoiceClient = {
8686
_eventHandlers[type].set(handler, NativeAppEventEmitter.addListener(type, rtn => { handler(rtn) }))
8787
},
8888
removeEventListener(type, handler) {
89+
NativeAppEventEmitter.removeAllListeners(type)
8990
if (!_eventHandlers[type].has(handler)) {
9091
return
9192
}

0 commit comments

Comments
 (0)