Merge pull request #758 from embark-framework/bugfix/profile-do-not-crash

profile always return
This commit is contained in:
Iuri Matias 2018-08-31 08:57:03 -04:00 committed by GitHub
commit aeb4c0d0c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -45,9 +45,7 @@ class GasEstimator {
getVarianceCb(err, gasAmount); getVarianceCb(err, gasAmount);
}); });
}, (err, variance) => { }, (err, variance) => {
if (err) { if (variance.every(v => v === variance[0])) {
return gasCb(err, name, abiMethod.type);
} else if (variance.every(v => v === variance[0])) {
gasMap[name] = variance[0]; gasMap[name] = variance[0];
} else { } else {
// get average // get average