Merge pull request #758 from embark-framework/bugfix/profile-do-not-crash
profile always return
This commit is contained in:
commit
aeb4c0d0c0
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue