Skip to content

Commit fc58da2

Browse files
devoto13anthony-redFox
authored andcommitted
fix(browser): make sure that empty results array is still recognized (karma-runner#3486)
Otherwise empty array is treated as a single value, which causes issues down the road.
1 parent f51fd4f commit fc58da2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/browser.js

Lines changed: 1 addition & 2 deletions
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)