Skip to content

Commit

Permalink
fix: atob parsing undef
Browse files Browse the repository at this point in the history
  • Loading branch information
jacovinus committed Dec 22, 2022
1 parent cd5304c commit dbc4964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ export function updateDataSourcesWithUrl(
if (haveCookies) {
let [auth, dsData] = cookies.split("@");
let cookieDsData = "";
if (dsData !== "") {
cookieDsData = atob(dsData);
if (dsData && dsData !== "") {
try {
cookieDsData = atob(dsData);
cookieDsData = JSON.parse(cookieDsData);
if (typeof cookieDsData === "object" && cookieDsData["url"]) {
apiUrl = cookieDsData["url"];
Expand Down

0 comments on commit dbc4964

Please sign in to comment.