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`",
|
"note": "`ZeroExRevertErrors.Migrate` -> `ZeroExRevertErrors.Ownable`",
|
||||||
"pr": 2564
|
"pr": 2564
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "`instanceof Array` => `Array.isArray`",
|
||||||
|
"pr": 2567
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -43,8 +43,7 @@ export abstract class AbstractSetDataType extends DataType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public generateCalldataBlock(value: any[] | object, parentBlock?: CalldataBlock): SetCalldataBlock {
|
public generateCalldataBlock(value: any[] | object, parentBlock?: CalldataBlock): SetCalldataBlock {
|
||||||
const block =
|
const block = Array.isArray(value)
|
||||||
value instanceof Array
|
|
||||||
? this._generateCalldataBlockFromArray(value, parentBlock)
|
? this._generateCalldataBlockFromArray(value, parentBlock)
|
||||||
: this._generateCalldataBlockFromObject(value, parentBlock);
|
: this._generateCalldataBlockFromObject(value, parentBlock);
|
||||||
return block;
|
return block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user