aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-18 04:32:54 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-18 05:44:40 +0800
commitd052342df7247f1efc830797a8f69245db247166 (patch)
tree0db938571449586aeaeb55c3dfbd8c8e4113d52c
parent32fa1bcc387e2eecae53db4b082e93f6fb09ae10 (diff)
downloaddexon-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.ts6
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) {