diff --git a/lib/modules/profiler/index.js b/lib/modules/profiler/index.js index 6bd51f2ac..4a4904000 100644 --- a/lib/modules/profiler/index.js +++ b/lib/modules/profiler/index.js @@ -55,7 +55,7 @@ class Profiler { let contractName = cmd.split(' ')[1]; if (cmdName === 'profile') { self.events.request('contracts:contract', contractName, (contract) => { - if (!contract.deployedAddress) { + if (!contract || !contract.deployedAddress) { self.logger.info("-- couldn't profile " + contractName + " - it's not deployed or could be an interface"); return ""; }