From f7bb95a057aee73e5fa712b055e82ebd0c95c3c6 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 7 Jun 2019 23:59:38 +0100 Subject: [PATCH] Check reporter (#7) --- lib/MultiReporters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MultiReporters.js b/lib/MultiReporters.js index 2f49c2b..3cb3c8d 100644 --- a/lib/MultiReporters.js +++ b/lib/MultiReporters.js @@ -111,7 +111,7 @@ MultiReporters.prototype.done = function (failures, fn) { } var reportersWithDoneHandler = this._reporters.filter(function (reporter) { - return typeof reporter.done === 'function'; + return reporter && (typeof reporter.done === 'function'); }); var numberOfReportersWithDoneHandler = _.size(reportersWithDoneHandler);