From 171b64bc988a708515a59cdd520936b8d87b30d3 Mon Sep 17 00:00:00 2001 From: timvisee Date: Tue, 6 Mar 2018 14:38:29 +0100 Subject: [PATCH] Don't translate URL-safe chars, b64 is doing it for us --- app/utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/utils.js b/app/utils.js index f22dea26..8b8a18d3 100644 --- a/app/utils.js +++ b/app/utils.js @@ -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) {