From 69c1fa29a21ad5527b68aa7b476a3f0bb24323ca Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Fri, 23 Jun 2017 10:46:31 +0200 Subject: [PATCH] use includes instead of indexOf --- src/transaction/makeOutput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction/makeOutput.js b/src/transaction/makeOutput.js index bbd628e..5edf426 100644 --- a/src/transaction/makeOutput.js +++ b/src/transaction/makeOutput.js @@ -13,7 +13,7 @@ export default function makeOutput(condition, amount = '1') { const publicKeys = [] const getPublicKeys = details => { if (details.type === 'ed25519-sha-256') { - if (publicKeys.indexOf(details.public_key) === -1) { + if (!publicKeys.includes(details.public_key)) { publicKeys.push(details.public_key) } } else if (details.type === 'threshold-sha-256') {