File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -30,22 +30,22 @@ if (RNOneSignal != null) {
3030
3131 _listeners [ eventName ] = handleEventBroadcast ( eventName , eventBroadcastName )
3232 }
33+ }
3334
34- function handleEventBroadcast ( type , broadcast ) {
35- return oneSignalEventEmitter . addListener (
36- broadcast , ( notification ) => {
37- // Check if we have added listener for this type yet
38- // Cache the result first if we have not.
39- var handler = _notificationHandler . get ( type ) ;
40-
41- if ( handler ) {
42- handler ( notification ) ;
43- } else {
44- _notificationCache . set ( type , notification ) ;
45- }
46- }
47- ) ;
48- }
35+ function handleEventBroadcast ( type , broadcast ) {
36+ return oneSignalEventEmitter . addListener (
37+ broadcast , ( notification ) => {
38+ // Check if we have added listener for this type yet
39+ // Cache the result first if we have not.
40+ var handler = _notificationHandler . get ( type ) ;
41+
42+ if ( handler ) {
43+ handler ( notification ) ;
44+ } else {
45+ _notificationCache . set ( type , notification ) ;
46+ }
47+ }
48+ ) ;
4949}
5050
5151function checkIfInitialized ( ) {
You can’t perform that action at this time.
0 commit comments