Skip to content

Commit

Permalink
Merge pull request #6 from lucasfcosta/fix-anonymous-functions-ie
Browse files Browse the repository at this point in the history
fix: tests for anonymous functions on IE
  • Loading branch information
keithamus committed Jun 6, 2016
2 parents b87bd62 + a219c3f commit d257b86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ function getConstructorName(errorLike) {
// If `err` is not an instance of Error it is an error constructor itself or another function.
// If we've got a common function we get its name, otherwise we may need to create a new instance
// of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more.
constructorName = getFunctionName(errorLike) || getFunctionName(new errorLike()); // eslint-disable-line new-cap
constructorName = getFunctionName(errorLike).trim() ||
getFunctionName(new errorLike()); // eslint-disable-line new-cap
}

return constructorName;
Expand Down

0 comments on commit d257b86

Please sign in to comment.