Skip to content

Commit 5d0c9a4

Browse files
author
Benjamin LONGEARET
committed
Use window.btoa if in browser mode
1 parent 4665ea0 commit 5d0c9a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
// Initial Setup
1717
// -------------
1818

19-
var XMLHttpRequest, _;
19+
var XMLHttpRequest, _, btoa;
2020
/* istanbul ignore else */
2121
if (typeof exports !== 'undefined') {
2222
XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
2323
_ = require('underscore');
2424
if (typeof btoa === 'undefined') {
2525
btoa = require('btoa'); //jshint ignore:line
2626
}
27-
2827
} else {
29-
_ = window._;
28+
_ = window._;
29+
btoa = window.btoa;
3030
}
3131

3232
//prefer native XMLHttpRequest always

0 commit comments

Comments
 (0)