Merge pull request #44 from ldesplat/XMLHttpRequest

Check XMLHttpRequest is a function for isInBrowser
This commit is contained in:
Evan Wallace 2015-03-12 00:42:12 -07:00
commit 25b7c6d80a

View File

@ -15,7 +15,7 @@ var fileContentsCache = {};
var sourceMapCache = {};
function isInBrowser() {
return typeof window !== 'undefined';
return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function'));
}
function retrieveFile(path) {