Skip to content

Commit

Permalink
fix incorrect grouping in conditional as result linting
Browse files Browse the repository at this point in the history
see #3017
  • Loading branch information
boneskull committed Sep 29, 2017
1 parent 0f816ac commit 547612c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Runner.prototype.fail = function (test, err) {
++this.failures;
test.state = 'failed';

if (!((err instanceof Error || err) && typeof err.message === 'string')) {
if (!(err instanceof Error || (err && typeof err.message === 'string'))) {
err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)');
}

Expand Down

0 comments on commit 547612c

Please sign in to comment.