mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Allow no args to be passed to rejection callback
Reviewed By: davidaurelio Differential Revision: D5301417 Tags: accept2ship fbshipit-source-id: a4fb74dd50eb63579e7b69a6d48d4020f718b81c
This commit is contained in:
committed by
Facebook Github Bot
parent
d795fa1b2c
commit
b6cfad27f8
@@ -119,7 +119,7 @@ function createErrorFromErrorData(errorData: {message: string}): ExtendedError {
|
||||
const {
|
||||
message,
|
||||
...extraErrorInfo
|
||||
} = errorData;
|
||||
} = errorData || {};
|
||||
const error : ExtendedError = new Error(message);
|
||||
error.framesToPop = 1;
|
||||
return Object.assign(error, extraErrorInfo);
|
||||
|
||||
Reference in New Issue
Block a user