Merge pull request #2567 from 0xProject/fix/instanceof-array-isArray
instanceof Array -> Array.isArray
This commit is contained in:
commit
a90b463a7d
@ -13,6 +13,10 @@
|
||||
{
|
||||
"note": "`ZeroExRevertErrors.Migrate` -> `ZeroExRevertErrors.Ownable`",
|
||||
"pr": 2564
|
||||
},
|
||||
{
|
||||
"note": "`instanceof Array` => `Array.isArray`",
|
||||
"pr": 2567
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -43,10 +43,9 @@ export abstract class AbstractSetDataType extends DataType {
|
||||
}
|
||||
|
||||
public generateCalldataBlock(value: any[] | object, parentBlock?: CalldataBlock): SetCalldataBlock {
|
||||
const block =
|
||||
value instanceof Array
|
||||
? this._generateCalldataBlockFromArray(value, parentBlock)
|
||||
: this._generateCalldataBlockFromObject(value, parentBlock);
|
||||
const block = Array.isArray(value)
|
||||
? this._generateCalldataBlockFromArray(value, parentBlock)
|
||||
: this._generateCalldataBlockFromObject(value, parentBlock);
|
||||
return block;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user