Fix misleading docstring on getInitialNotification

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 https://github.com/facebook/react-native/pull/9052

Differential Revision: D3662807

Pulled By: javache

fbshipit-source-id: 7a2573e03d7704b2d62a3499d350506ae73e8d77
This commit is contained in:
ExplodingCabbage 2016-08-03 12:17:05 -07:00 committed by Facebook Github Bot 8
parent 2fe5573492
commit baf207e724
1 changed files with 2 additions and 2 deletions

View File

@ -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 => {