Merge pull request #25 from embark-framework/bugfix/check-for-window

Use window for check
This commit is contained in:
Anthony Laibe 2018-11-01 11:47:26 +01:00 committed by GitHub
commit 0e3fe0dd5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ Blockchain.connect = function(connectionList, opts, doneCb) {
} }
const connectWeb3 = async (next) => { const connectWeb3 = async (next) => {
if (ethereum) { if (window.ethereum) {
try { try {
await ethereum.enable(); await ethereum.enable();
web3.setProvider(ethereum); web3.setProvider(ethereum);