bugfix: must call atob/btoa from window context
This commit is contained in:
parent
7a3d5777e0
commit
51df65a0dd
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
OAUTH3._base64.btoa = function (b64) {
|
OAUTH3._base64.btoa = function (b64) {
|
||||||
// http://stackoverflow.com/questions/9677985/uncaught-typeerror-illegal-invocation-in-chrome
|
// http://stackoverflow.com/questions/9677985/uncaught-typeerror-illegal-invocation-in-chrome
|
||||||
(exports.btoa || require('btoa'))(b64);
|
return (exports.btoa || require('btoa'))(b64);
|
||||||
}
|
}
|
||||||
OAUTH3._base64.encodeUrlSafe = function (b64) {
|
OAUTH3._base64.encodeUrlSafe = function (b64) {
|
||||||
// Base64 to URL-safe Base64
|
// Base64 to URL-safe Base64
|
||||||
|
|
Loading…
Reference in New Issue