Skip to content

Commit

Permalink
fix(browser): nicer "disconnect" - no more "Disconnectedundefined"
Browse files Browse the repository at this point in the history
The method "disconnect" sometimes is called without arguments. The emited message should not look broken then.
  • Loading branch information
apepper authored and dignifiedquire committed Mar 13, 2018
1 parent e7b9ab8 commit a987d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Browser = function (id, fullName, /* capturedBrowsers */ collection, emitter
self.state = DISCONNECTED
self.disconnectsCount++
log.warn('Disconnected (%d times)' + (reason || ''), self.disconnectsCount)
emitter.emit('browser_error', self, 'Disconnected' + reason)
emitter.emit('browser_error', self, 'Disconnected' + (reason || ''))
collection.remove(self)
}

Expand Down

0 comments on commit a987d63

Please sign in to comment.