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:
Pieter De Baets 2017-06-22 09:54:10 -07:00 committed by Facebook Github Bot
parent d795fa1b2c
commit b6cfad27f8
1 changed files with 1 additions and 1 deletions

View File

@ -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);