Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
why can't I have nice things
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 6, 2016
1 parent 3728047 commit 12a1608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/agreement.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ exports.handlerSelector = (rawConn, handlersMap) => {
}
log('received: %s', data.toString())
const protocol = data.toString().slice(0, -1)
const [key] = Object.keys(handlersMap).filter((id) => id === protocol)
const result = Object.keys(handlersMap).filter((id) => id === protocol)
const key = result && result[0]

if (key) {
log('ack: %s', protocol)
Expand Down

0 comments on commit 12a1608

Please sign in to comment.