Don't translate URL-safe chars, b64 is doing it for us
This commit is contained in:
parent
cfc94fd9af
commit
171b64bc98
@ -9,10 +9,9 @@ function arrayToB64(array) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function b64ToArray(str) {
|
function b64ToArray(str) {
|
||||||
str = (str + '==='.slice((str.length + 3) % 4))
|
return b64.toByteArray(
|
||||||
.replace(/-/g, '+')
|
str + '==='.slice((str.length + 3) % 4)
|
||||||
.replace(/_/g, '/');
|
);
|
||||||
return b64.toByteArray(str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadShim(polyfill) {
|
function loadShim(polyfill) {
|
||||||
|
Loading…
Reference in New Issue
Block a user