Skip to content

Commit

Permalink
Merge pull request mochajs#650 from jfirebaugh/instanceof
Browse files Browse the repository at this point in the history
Remove instanceof occurrence
  • Loading branch information
tj committed Nov 8, 2012
2 parents 42529ae + 21dccc2 commit 3cb5e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runnable.js
Expand Up @@ -188,7 +188,7 @@ Runnable.prototype.run = function(fn){
if (this.async) {
try {
this.fn.call(ctx, function(err){
if (err instanceof Error) return done(err);
if (Object.prototype.toString.call(err) === "[object Error]") return done(err);
if (null != err) return done(new Error('done() invoked with non-Error: ' + err));
done();
});
Expand Down

0 comments on commit 3cb5e3a

Please sign in to comment.