mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
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
a04f26dc3d
commit
7a34b9d675
@ -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…
x
Reference in New Issue
Block a user