Skip to content

Commit

Permalink
atob function scope fix (#5296)
Browse files Browse the repository at this point in the history
  • Loading branch information
buu700 committed Oct 12, 2017
1 parent f98d511 commit 42992ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base64Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';

var atob = atob || function (input) {
var decodeBase64 = typeof atob === 'function' ? atob : function (input) {
/**
* Decodes a base64 string.
* @param {String} input The string to decode.
Expand Down Expand Up @@ -55,7 +55,7 @@ function intArrayFromBase64(s) {
}

try {
var decoded = atob(s);
var decoded = decodeBase64(s);
var bytes = new Uint8Array(decoded.length);
for (var i = 0 ; i < decoded.length ; ++i) {
bytes[i] = decoded.charCodeAt(i);
Expand Down

0 comments on commit 42992ef

Please sign in to comment.