Merge pull request #781 from timvisee/master

Don't translate URL-safe chars, b64 is doing it for us
This commit is contained in:
Danny Coates 2018-03-06 08:44:53 -08:00 committed by GitHub
commit 41796840c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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) {