Change Promise.done to Promise.then

Summary:
- [X] Explain the **motivation** for making this change.
- [X] Provide a **test plan** demonstrating that the code is solid.
- [X] Match the **code formatting** of the rest of the codebase.
- [X] Target the `master` branch, NOT a "stable" branch.

`Promise.done` is non-standard, `Promise.then` is preferred as a standardized method. On Android, polyfill filling in `Promise.done` has been most probably taken out in newer versions of `react-native` and app crashes when it tries to query network state through `NetInfo`.

No tests are required for this change.
Closes https://github.com/facebook/react-native/pull/13489

Differential Revision: D4897566

Pulled By: mkonicek

fbshipit-source-id: 140720d7367cd1d9bf8924ec8a118c1bff4e461d
This commit is contained in:
Jakub Šimo 2017-04-16 15:25:05 -07:00 коммит произвёл Facebook Github Bot
Родитель 665fc86a6e
Коммит 82f3964f2d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -79,7 +79,7 @@ const _isConnectedSubscriptions = new Map();
* NetInfo exposes info about online/offline status
*
* ```
* NetInfo.fetch().done((reach) => {
* NetInfo.fetch().then((reach) => {
* console.log('Initial: ' + reach);
* });
* function handleFirstConnectivityChange(reach) {