Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ab2732

Browse files
author
Ændrew Rininsland
committed
Merge pull request github-tools#198 from firehist/fix/atob
Fix btoa context error
2 parents f1c17ea + 5d0c9a4 commit 3ab2732

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

github.js

Lines changed: 4 additions & 4 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') {
25-
var btoa = require('btoa'); //jshint ignore:line
25+
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)