Skip to content

Commit

Permalink
fix(browser): make sure that empty results array is still recognized (k…
Browse files Browse the repository at this point in the history
…arma-runner#3486)

Otherwise empty array is treated as a single value, which causes issues down the road.
  • Loading branch information
devoto13 authored and anthony-redFox committed May 5, 2023
1 parent f51fd4f commit fc58da2
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 fc58da2

Please sign in to comment.