Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 8c4a4fc

Browse files
committed
Fix iOS crash with iOS.
1 parent 1db692b commit 8c4a4fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Notifications.configure = function(options) {
8787
this.callNative( 'addEventListener', [ 'register', this._onRegister ] );
8888
this.callNative( 'addEventListener', [ 'notification', this._onNotification ] );
8989
this.callNative( 'addEventListener', [ 'localNotification', this._onNotification ] );
90-
this.callNative( 'addEventListener', [ 'action', this._onAction ] );
90+
Platform.OS === 'android' ? this.callNative( 'addEventListener', [ 'action', this._onAction ] ) : null
9191
Platform.OS === 'android' ? this.callNative( 'addEventListener', [ 'remoteFetch', this._onRemoteFetch ] ) : null
9292

9393
this.isLoaded = true;
@@ -125,7 +125,7 @@ Notifications.unregister = function() {
125125
this.callNative( 'removeEventListener', [ 'register', this._onRegister ] )
126126
this.callNative( 'removeEventListener', [ 'notification', this._onNotification ] )
127127
this.callNative( 'removeEventListener', [ 'localNotification', this._onNotification ] )
128-
this.callNative( 'removeEventListener', [ 'action', this._onAction ] )
128+
Platform.OS === 'android' ? this.callNative( 'removeEventListener', [ 'action', this._onAction ] ) : null
129129
Platform.OS === 'android' ? this.callNative( 'removeEventListener', [ 'remoteFetch', this._onRemoteFetch ] ) : null
130130
this.isLoaded = false;
131131
};

0 commit comments

Comments
 (0)