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

Commit 12a1608

Browse files
why can't I have nice things
1 parent 3728047 commit 12a1608

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/agreement.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ exports.handlerSelector = (rawConn, handlersMap) => {
5656
}
5757
log('received: %s', data.toString())
5858
const protocol = data.toString().slice(0, -1)
59-
const [key] = Object.keys(handlersMap).filter((id) => id === protocol)
59+
const result = Object.keys(handlersMap).filter((id) => id === protocol)
60+
const key = result && result[0]
6061

6162
if (key) {
6263
log('ack: %s', protocol)

0 commit comments

Comments
 (0)