From 4b454c1888b8e6330d2c0fe34a99813f681ec9d4 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 6 Apr 2021 12:42:02 +0200 Subject: [PATCH] js error handled for gas estimation --- apps/remix-ide/src/app/editor/contextualListener.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/editor/contextualListener.js b/apps/remix-ide/src/app/editor/contextualListener.js index d7b829a4c8..3f748d6b54 100644 --- a/apps/remix-ide/src/app/editor/contextualListener.js +++ b/apps/remix-ide/src/app/editor/contextualListener.js @@ -215,8 +215,8 @@ class ContextualListener extends Plugin { const contract = this.nodes[i] this.contract = this.results.data.contracts[this.results.source.target][contract.name] this.estimationObj = this.contract.evm.gasEstimates - this.creationCost = this.estimationObj.creation.totalCost - this.codeDepositCost = this.estimationObj.creation.codeDepositCost + this.creationCost = this.estimationObj === null ? '' : this.estimationObj.creation.totalCost + this.codeDepositCost = this.estimationObj === null ? '' : this.estimationObj.creation.codeDepositCost } } }