Skip to content

Commit c44e23e

Browse files
committed
Fixed compatibility with Browserify and browsers
This commit fixes the case where Browserify is used in a browser-context.
1 parent c3d5bb6 commit c44e23e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Node. Does not work with strict CommonJS, but
2525
// only CommonJS-like enviroments that support module.exports,
2626
// like Node.
27-
module.exports = factory(require('xmlhttprequest').XMLHttpRequest, require('js-base64').Base64.encode);
27+
module.exports = factory(XMLHttpRequest || require('xmlhttprequest').XMLHttpRequest, require('js-base64').Base64.encode);
2828
} else {
2929
// Browser globals
3030
var b64encode = function(str) {

0 commit comments

Comments
 (0)