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:
parent
96ce4f3941
commit
69c1fa29a2
@ -13,7 +13,7 @@ export default function makeOutput(condition, amount = '1') {
|
|||||||
const publicKeys = []
|
const publicKeys = []
|
||||||
const getPublicKeys = details => {
|
const getPublicKeys = details => {
|
||||||
if (details.type === 'ed25519-sha-256') {
|
if (details.type === 'ed25519-sha-256') {
|
||||||
if (publicKeys.indexOf(details.public_key) === -1) {
|
if (!publicKeys.includes(details.public_key)) {
|
||||||
publicKeys.push(details.public_key)
|
publicKeys.push(details.public_key)
|
||||||
}
|
}
|
||||||
} else if (details.type === 'threshold-sha-256') {
|
} else if (details.type === 'threshold-sha-256') {
|
||||||
|
Loading…
Reference in New Issue
Block a user