1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2025-02-14 21:10:32 +01:00

use includes instead of indexOf

This commit is contained in:
Scott Sadler 2017-06-23 10:46:31 +02:00
parent 96ce4f3941
commit 69c1fa29a2

View File

@ -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') {