Skip to content

Commit

Permalink
Fix crash when Promise rejects with null
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Eneman committed Aug 27, 2018
1 parent c93e027 commit 56f452a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/jest-jasmine2/src/is_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function isError(potentialError: any) {
// duck-type Error, see #2549
const isError =
typeof potentialError === 'object' &&
potentialError !== null &&
typeof potentialError.message === 'string' &&
typeof potentialError.name === 'string';
const message = isError
Expand Down

0 comments on commit 56f452a

Please sign in to comment.