From a34d083cad3a07965bcb1687dd6534a30d79b7d0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 26 May 2017 18:35:35 +0200 Subject: Refactor to ternary --- src/ts/contract_wrappers/contract_wrapper.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/ts/contract_wrappers/contract_wrapper.ts b/src/ts/contract_wrappers/contract_wrapper.ts index 225cb960f..9f4cd8039 100644 --- a/src/ts/contract_wrappers/contract_wrapper.ts +++ b/src/ts/contract_wrappers/contract_wrapper.ts @@ -33,12 +33,7 @@ export class ContractWrapper { } try { - let contractInstance; - if (_.isUndefined(address)) { - contractInstance = await c.deployed(); - } else { - contractInstance = await c.at(address); - } + const contractInstance = _.isUndefined(address) ? await c.deployed() : await c.at(address); return contractInstance; } catch (err) { const errMsg = `${err}`; -- cgit