mirror of https://github.com/embarklabs/embark.git
Fix profile command
In case the contract don't exist or the profile command don't have argument, embark don't crash and return an error
This commit is contained in:
parent
65b29d5db6
commit
4039bbac6b
|
@ -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 "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue