mirror of https://github.com/status-im/web3.js.git
Meteor 1.3+ can handle default CommonJs syntax
This commit is contained in:
parent
f8439654b6
commit
a3a963eff3
|
@ -29,12 +29,8 @@ var errors = require('./errors');
|
||||||
// workaround to use httpprovider in different envs
|
// workaround to use httpprovider in different envs
|
||||||
var XMLHttpRequest; // jshint ignore: line
|
var XMLHttpRequest; // jshint ignore: line
|
||||||
|
|
||||||
// meteor server environment
|
|
||||||
if (typeof Meteor !== 'undefined' && Meteor.isServer) { // jshint ignore: line
|
|
||||||
XMLHttpRequest = Npm.require('xmlhttprequest').XMLHttpRequest; // jshint ignore: line
|
|
||||||
|
|
||||||
// browser
|
// browser
|
||||||
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
||||||
XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line
|
XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line
|
||||||
|
|
||||||
// node
|
// node
|
||||||
|
|
Loading…
Reference in New Issue