From 5f8f7f35acc3d82f71a101914ddbc3fce263cae4 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 11 Jun 2018 16:27:39 -0400 Subject: [PATCH] fix checking web3 --- js/embark.js | 2 +- js/embark_node.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/embark.js b/js/embark.js index 06817208..86d31a04 100644 --- a/js/embark.js +++ b/js/embark.js @@ -26,7 +26,7 @@ EmbarkJS.Contract = function(options) { this.code = '0x' + options.code; //this.web3 = options.web3 || web3; this.web3 = options.web3; - if (!this.web3 && typeof ('web3') !== 'undefined') { + if (!this.web3 && typeof (web3) !== 'undefined') { this.web3 = web3; } else if (!this.web3) { this.web3 = window.web3; diff --git a/js/embark_node.js b/js/embark_node.js index bfcda6da..9e9ea8b7 100644 --- a/js/embark_node.js +++ b/js/embark_node.js @@ -26,7 +26,7 @@ EmbarkJS.Contract = function(options) { this.code = '0x' + options.code; //this.web3 = options.web3 || web3; this.web3 = options.web3; - if (!this.web3 && typeof ('web3') !== 'undefined') { + if (!this.web3 && typeof (web3) !== 'undefined') { this.web3 = web3; } else if (!this.web3) { this.web3 = window.web3;