diff --git a/src/modules/notifications/IOSNotification.js b/src/modules/notifications/IOSNotification.js index 5a360a8e..cc1dbf9b 100644 --- a/src/modules/notifications/IOSNotification.js +++ b/src/modules/notifications/IOSNotification.js @@ -3,9 +3,8 @@ * IOSNotification representation wrapper */ import type Notification from './Notification'; -import IOSNotifications, { - type BackgroundFetchResultValue, -} from './IOSNotifications'; +import type Notifications from '.'; +import { type BackgroundFetchResultValue } from './IOSNotifications'; import type { IOSAttachment, IOSAttachmentOptions, @@ -42,7 +41,7 @@ export default class IOSNotification { constructor( notification: Notification, - notifications: IOSNotifications, + notifications: Notifications, data?: NativeIOSNotification ) { this._notification = notification; @@ -65,8 +64,8 @@ export default class IOSNotification { getNativeModule(notifications).complete(notificationId, fetchResult); }; - if (notifications.shouldAutoComplete) { - complete(notifications.backgroundFetchResult.noData); + if (notifications.ios.shouldAutoComplete) { + complete(notifications.ios.backgroundFetchResult.noData); } else { this._complete = complete; } diff --git a/src/modules/notifications/Notification.js b/src/modules/notifications/Notification.js index 9eec6b21..5d7bae0e 100644 --- a/src/modules/notifications/Notification.js +++ b/src/modules/notifications/Notification.js @@ -57,7 +57,7 @@ export default class Notification { ); this._ios = new IOSNotification( this, - notifications.ios, + notifications, nativeNotification && nativeNotification.ios );