Skip to content

Commit

Permalink
fix(browser): make sure that empty results array is still recognized
Browse files Browse the repository at this point in the history
Otherwise empty array is treated as a single value, which causes issues down the road.
  • Loading branch information
devoto13 committed Apr 29, 2020
1 parent 69c7ba3 commit 37efa6a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 37efa6a

Please sign in to comment.