Merge pull request #412 from mhhf/master

Meteor 1.3+ can handle default CommonJs syntax
This commit is contained in:
Fabian Vogelsteller 2016-06-27 15:26:41 +02:00 committed by GitHub
commit f317f5cf05
1 changed files with 1 additions and 5 deletions

View File

@ -29,12 +29,8 @@ var errors = require('./errors');
// workaround to use httpprovider in different envs
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
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
if (typeof window !== 'undefined' && window.XMLHttpRequest) {
XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line
// node