diff --git a/Libraries/Utilities/PushNotificationIOS.js b/Libraries/Utilities/PushNotificationIOS.js index 390fa933e..86733bde3 100644 --- a/Libraries/Utilities/PushNotificationIOS.js +++ b/Libraries/Utilities/PushNotificationIOS.js @@ -9,8 +9,10 @@ var NativeModules = require('NativeModules'); var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter'); var RCTPushNotificationManager = NativeModules.RCTPushNotificationManager; +if (RCTPushNotificationManager) { + var _initialNotification = RCTPushNotificationManager.initialNotification; +} -var _initialNotification = RCTPushNotificationManager.initialNotification; var _notifHandlers = {}; var DEVICE_NOTIF_EVENT = 'remoteNotificationReceived';