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._title = nativeNotification.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._android = new AndroidNotification(
|
if(Platform.OS === 'ios'){
|
||||||
this,
|
this._ios = new IOSNotification(
|
||||||
nativeNotification && nativeNotification.android
|
this,
|
||||||
);
|
notifications,
|
||||||
this._ios = new IOSNotification(
|
nativeNotification && nativeNotification.ios
|
||||||
this,
|
);
|
||||||
notifications,
|
} else {
|
||||||
nativeNotification && nativeNotification.ios
|
this._android = new AndroidNotification(
|
||||||
);
|
this,
|
||||||
|
nativeNotification && nativeNotification.android
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
this._data = this._data || {};
|
this._data = this._data || {};
|
||||||
|
|
Loading…
Reference in New Issue