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
…3486)

Otherwise empty array is treated as a single value, which causes issues down the road.
  • Loading branch information
devoto13 committed Apr 30, 2020
1 parent 255bf67 commit fa95fa3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/browser.js
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 fa95fa3

Please sign in to comment.