danieldunderfelt 591217ea7d Make onUnhandled safe for undefined errors
Summary:
This pull request fixes cases where the `error` argument of the `onUnhandled` method in `Libraries/Promise.js` is undefined. Previously this would result in a redbox with the helpful message: `Cannot read property message of undefined`. With this pull request, unhandled promise rejections result in the desired yellowbox saying that a promise rejection went unhandled.

I still do not know what would cause the error argument to be undefined, but this change makes the module behave as expected in an app I am building.

cc bestander

Relevant issue: #8452
Closes https://github.com/facebook/react-native/pull/9119

Differential Revision: D3655589

Pulled By: bestander

fbshipit-source-id: a975a0ab58701240ba06574c04521cd542700ff7
2016-08-02 07:58:28 -07:00
..
2015-07-24 08:41:58 -08:00
2016-07-11 19:43:21 -07:00
2016-07-06 12:58:41 -07:00
2016-07-14 11:13:27 -07:00
2016-08-01 22:13:27 -07:00
2016-07-19 10:43:29 -07:00
2016-07-25 03:43:29 -07:00
2016-07-25 03:43:29 -07:00