From 328913afaca3518240ebd6baa5c18b791bdf3b3e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 9 Feb 2018 10:42:10 -0500 Subject: [PATCH] add a check for the window var itself --- remix-lib/src/execution/execution-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remix-lib/src/execution/execution-context.js b/remix-lib/src/execution/execution-context.js index d7fa88f46b..76be5d96fc 100644 --- a/remix-lib/src/execution/execution-context.js +++ b/remix-lib/src/execution/execution-context.js @@ -11,7 +11,7 @@ var rlp = ethUtil.rlp var injectedProvider var web3 -if (typeof window.web3 !== 'undefined') { +if (typeof window !== 'undefined' && typeof window.web3 !== 'undefined') { injectedProvider = window.web3.currentProvider web3 = new Web3(injectedProvider) } else {