diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-28 05:10:34 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:11 +0800 |
commit | f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76 (patch) | |
tree | 52cafb673165eff83d3c75938ff5298ffbd8a68c /packages/utils/src/abi_encoder/calldata/iterator.ts | |
parent | 2e79ce26cbeacdeb0ea52b7c2e3da68e8055e7c6 (diff) | |
download | dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar.gz dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar.bz2 dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar.lz dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar.xz dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.tar.zst dexon-sol-tools-f31d4ddffd8dd97f2b2dc226f4f132d1c3192c76.zip |
Replaced null/undefined checks with lodash
Diffstat (limited to 'packages/utils/src/abi_encoder/calldata/iterator.ts')
-rw-r--r-- | packages/utils/src/abi_encoder/calldata/iterator.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_encoder/calldata/iterator.ts b/packages/utils/src/abi_encoder/calldata/iterator.ts index 8e2b16a5a..5307f7944 100644 --- a/packages/utils/src/abi_encoder/calldata/iterator.ts +++ b/packages/utils/src/abi_encoder/calldata/iterator.ts @@ -55,7 +55,7 @@ abstract class BaseIterator implements Iterable<CalldataBlock> { _.each(set.getMembers(), (member: CalldataBlock) => { // Traverse child if it is a unique pointer. // A pointer that is an alias for another pointer is ignored. - if (member instanceof CalldataBlocks.Pointer && member.getAlias() === undefined) { + if (member instanceof CalldataBlocks.Pointer && _.isUndefined(member.getAlias())) { const dependency = member.getDependency(); queue.mergeBack(BaseIterator._createQueue(dependency)); } @@ -74,7 +74,7 @@ abstract class BaseIterator implements Iterable<CalldataBlock> { return { next: () => { const nextBlock = this.nextBlock(); - if (nextBlock !== undefined) { + if (!_.isUndefined(nextBlock)) { return { value: nextBlock, done: false, |