Skip to content

Commit e77d0a0

Browse files
committed
Makes the require call work in node.js
1 parent 04ad0a3 commit e77d0a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function createActiveXHR() {
2424
}
2525

2626
// Create the request object
27-
var createXHR = window.ActiveXObject ?
27+
var createXHR = (typeof window !== "undefined" && window.ActiveXObject) ?
2828
/* Microsoft failed to properly
2929
* implement the XMLHttpRequest in IE7 (can't request local files),
3030
* so we use the ActiveXObject when it is available

0 commit comments

Comments
 (0)