Replace lodash with built-ins where possible to reduce bundle size (#1766)
* add tslint rule to disallow lodash.isUndefined * add tslint rule to disallow lodash.isNull * apply fixes
This commit is contained in:
@@ -102,7 +102,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
* given networkId.
|
||||
*/
|
||||
export function getContractAddressesForNetworkOrThrow(networkId: NetworkId): ContractAddresses {
|
||||
if (_.isUndefined(networkToAddresses[networkId])) {
|
||||
if (networkToAddresses[networkId] === undefined) {
|
||||
throw new Error(`Unknown network id (${networkId}). No known 0x contracts have been deployed on this network.`);
|
||||
}
|
||||
return networkToAddresses[networkId];
|
||||
|
||||
Reference in New Issue
Block a user