Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

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

Merged
merged 1 commit into from
Mar 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down