Fix receiving notifications on Android
TypeError: undefined is not an object (evaluating 'notifications.ios') https://github.com/invertase/react-native-firebase/issues/1445
This commit is contained in:
parent
4afed7f121
commit
46951bf438
|
@ -51,15 +51,18 @@ export default class Notification {
|
|||
this._title = nativeNotification.title;
|
||||
}
|
||||
|
||||
this._android = new AndroidNotification(
|
||||
this,
|
||||
nativeNotification && nativeNotification.android
|
||||
);
|
||||
if(Platform.OS === 'ios'){
|
||||
this._ios = new IOSNotification(
|
||||
this,
|
||||
notifications,
|
||||
nativeNotification && nativeNotification.ios
|
||||
);
|
||||
} else {
|
||||
this._android = new AndroidNotification(
|
||||
this,
|
||||
nativeNotification && nativeNotification.android
|
||||
);
|
||||
}
|
||||
|
||||
// Defaults
|
||||
this._data = this._data || {};
|
||||
|
|
Loading…
Reference in New Issue