diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-18 04:32:54 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-18 05:44:40 +0800 |
commit | d052342df7247f1efc830797a8f69245db247166 (patch) | |
tree | 0db938571449586aeaeb55c3dfbd8c8e4113d52c | |
parent | 32fa1bcc387e2eecae53db4b082e93f6fb09ae10 (diff) | |
download | dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar.gz dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar.bz2 dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar.lz dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar.xz dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.tar.zst dexon-sol-tools-d052342df7247f1efc830797a8f69245db247166.zip |
use lodash isUndefined per PR comment
-rw-r--r-- | packages/instant/src/util/asset_data.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/instant/src/util/asset_data.ts b/packages/instant/src/util/asset_data.ts index 4f3db8447..f7c5b78cd 100644 --- a/packages/instant/src/util/asset_data.ts +++ b/packages/instant/src/util/asset_data.ts @@ -1,14 +1,16 @@ +import * as _ from 'lodash'; + import { AssetProxyId } from '@0xproject/types'; import { assetMetaData } from '../data/asset_meta_data'; export const assetDataUtil = { bestNameForAsset: (assetData: string | undefined, defaultString: string) => { - if (assetData === undefined) { + if (_.isUndefined(assetData)) { return defaultString; } const metaData = assetMetaData[assetData]; - if (metaData === undefined) { + if (_.isUndefined(metaData)) { return defaultString; } if (metaData.assetProxyId === AssetProxyId.ERC20) { |