Merge pull request #639 from embark-framework/bugfix/profile-command

Fix profile command
This commit is contained in:
Jonathan Rainville 2018-07-25 16:40:06 -04:00 committed by GitHub
commit b89211bd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 "";
}