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:
parent
d795fa1b2c
commit
b6cfad27f8
|
@ -119,7 +119,7 @@ function createErrorFromErrorData(errorData: {message: string}): ExtendedError {
|
||||||
const {
|
const {
|
||||||
message,
|
message,
|
||||||
...extraErrorInfo
|
...extraErrorInfo
|
||||||
} = errorData;
|
} = errorData || {};
|
||||||
const error : ExtendedError = new Error(message);
|
const error : ExtendedError = new Error(message);
|
||||||
error.framesToPop = 1;
|
error.framesToPop = 1;
|
||||||
return Object.assign(error, extraErrorInfo);
|
return Object.assign(error, extraErrorInfo);
|
||||||
|
|
Loading…
Reference in New Issue