Skip to content

Commit

Permalink
Fix misleading docstring on getInitialNotification
Browse files Browse the repository at this point in the history
Summary:
The docs heavily implied that this method returned a notification object or null directly, like popInitialNotification used to do. In fact, it returns a promise. This change clarifies this.

Note that:
- This is purely a comment change, so no testing required.
- I've adhered to the 80 character line limit, and can't think of any other style rules you might have that could apply here.
Closes #9052

Differential Revision: D3662807

Pulled By: javache

fbshipit-source-id: 7a2573e03d7704b2d62a3499d350506ae73e8d77
  • Loading branch information
ExplodingCabbage authored and Facebook Github Bot 8 committed Aug 3, 2016
1 parent 2fe5573 commit baf207e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/PushNotificationIOS/PushNotificationIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ class PushNotificationIOS {
}

/**
* If the app launch was triggered by a push notification,
* it will give the notification object, otherwise it will give `null`
* This method returns a promise that resolves to either the notification
* object if the app was launched by a push notification, or `null` otherwise.
*/
static getInitialNotification(): Promise<?PushNotificationIOS> {
return RCTPushNotificationManager.getInitialNotification().then(notification => {
Expand Down

0 comments on commit baf207e

Please sign in to comment.