From 37efa6a7ad61b517e5eb5cf8a19d306074cbb75e Mon Sep 17 00:00:00 2001 From: Yaroslav Admin Date: Fri, 24 Apr 2020 13:09:12 +0200 Subject: [PATCH] fix(browser): make sure that empty results array is still recognized Otherwise empty array is treated as a single value, which causes issues down the road. --- lib/browser.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/browser.js b/lib/browser.js index 20fd93d0b..0a0360f7a 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -152,9 +152,8 @@ class Browser { } onResult (result) { - if (result.length) { + if (Array.isArray(result)) { result.forEach(this.onResult, this) - return } else if (this.isNotConnected()) { this.lastResult.add(result) this.emitter.emit('spec_complete', this, result)