mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
Fix loading swarm-api in node or browser
This commit is contained in:
parent
c22901ab95
commit
583318169a
@ -1,6 +1,9 @@
|
||||
/*global web3 */
|
||||
let __embarkSwarm = {_swarmConnection: undefined};
|
||||
const SwarmAPI = require('swarm-api');
|
||||
let SwarmAPI = require('swarm-api');
|
||||
if (SwarmAPI.default) {
|
||||
SwarmAPI = SwarmAPI.default;
|
||||
}
|
||||
|
||||
__embarkSwarm.setProvider = function (options) {
|
||||
let protocol = options.protocol || 'http';
|
||||
|
Loading…
x
Reference in New Issue
Block a user