File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ const CONSTANTS = {
2020export { emit , CONSTANTS } ;
2121
2222class EventListener {
23- constructor ( type , listener ) {
23+ constructor ( type , listener , callkeep ) {
2424 this . _type = type ;
2525 this . _listener = listener ;
26+ this . _callkeep = callkeep ;
2627 }
2728
2829 remove = ( ) => {
29- callKeep . removeEventListener ( this . _type , this . _listener ) ;
30+ this . _callkeep . removeEventListener ( this . _type , this . _listener ) ;
3031 } ;
3132}
3233
@@ -43,7 +44,7 @@ class RNCallKeep {
4344
4445 this . _callkeepEventHandlers . set ( type , listenerSet ) ;
4546
46- return new EventListener ( type , listener ) ;
47+ return new EventListener ( type , listener , this ) ;
4748 } ;
4849
4950 removeEventListener = ( type , listener = undefined ) => {
@@ -375,6 +376,4 @@ class RNCallKeep {
375376 }
376377}
377378
378- const callKeep = new RNCallKeep ( ) ;
379-
380- export default callKeep ;
379+ export default new RNCallKeep ( ) ;
You can’t perform that action at this time.
0 commit comments