Skip to content

Commit dae3428

Browse files
committed
Avoid calling done() twice.
1 parent bc06b85 commit dae3428

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/runnable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,11 @@ Runnable.prototype.run = function (fn) {
324324
}
325325

326326
if (this.allowUncaught) {
327-
callFn(this.fn);
328-
done();
327+
if (this.isPending()) {
328+
done();
329+
} else {
330+
callFn(this.fn);
331+
}
329332
return;
330333
}
331334

0 commit comments

Comments
 (0)