Skip to content

Commit c5f472f

Browse files
committed
reverse btoa atob
1 parent da24cb0 commit c5f472f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/utilities.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function isLocalStorageSupported() {
6868

6969
function saveKeyValueToLocalStorage(k, v) {
7070
try {
71-
localStorage.setItem(k, atob(v));
71+
localStorage.setItem(k, btoa(v));
7272
return true;
7373
} catch (e) {
7474
console.log('Unable to store data:', e);
@@ -78,7 +78,7 @@ function saveKeyValueToLocalStorage(k, v) {
7878

7979
function getKeyValueFromLocalStorage(k) {
8080
try {
81-
return btoa(localStorage.getItem(k));
81+
return atob(localStorage.getItem(k));
8282
} catch (e) {
8383
console.log('Unable to get data:', e);
8484
return false;

0 commit comments

Comments
 (0)