Don't translate URL-safe chars, b64 is doing it for us

This commit is contained in:
timvisee 2018-03-06 14:38:29 +01:00
parent cfc94fd9af
commit 171b64bc98
No known key found for this signature in database
GPG Key ID: 109CBA0BF74036C2

View File

@ -9,10 +9,9 @@ function arrayToB64(array) {
}
function b64ToArray(str) {
str = (str + '==='.slice((str.length + 3) % 4))
.replace(/-/g, '+')
.replace(/_/g, '/');
return b64.toByteArray(str);
return b64.toByteArray(
str + '==='.slice((str.length + 3) % 4)
);
}
function loadShim(polyfill) {