Skip to content

Commit fa95fa3

Browse files
authoredApr 30, 2020
fix(browser): make sure that empty results array is still recognized (#3486)
Otherwise empty array is treated as a single value, which causes issues down the road.
1 parent 255bf67 commit fa95fa3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎lib/browser.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ class Browser {
152152
}
153153

154154
onResult (result) {
155-
if (result.length) {
155+
if (Array.isArray(result)) {
156156
result.forEach(this.onResult, this)
157-
return
158157
} else if (this.isNotConnected()) {
159158
this.lastResult.add(result)
160159
this.emitter.emit('spec_complete', this, result)

0 commit comments

Comments
 (0)
Please sign in to comment.