Skip to content

Commit 00609f3

Browse files
authored
Merge pull request #3841 from itsmdasifraza/fix/selfhost-route
fix: selfhost route
2 parents 3a125be + 1be1e3a commit 00609f3

File tree

1 file changed

+15
-1
lines changed
  • apps/@sparrow-desktop/src/utils

1 file changed

+15
-1
lines changed

apps/@sparrow-desktop/src/utils/jwt.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,21 @@ const getAuthJwt = () => {
4040
};
4141

4242
const getSelfhostUrls = () => {
43-
return [localStorage.getItem("SELFHOST_BACKEND_URL"), localStorage.getItem("SELFHOST_WEB_APP_URL"), localStorage.getItem("SELFHOST_ADMIN_URL")];
43+
let backendUrl = localStorage.getItem("SELFHOST_BACKEND_URL");
44+
let webAppUrl = localStorage.getItem("SELFHOST_WEB_APP_URL");
45+
let adminUrl = localStorage.getItem("SELFHOST_ADMIN_URL")
46+
47+
if(backendUrl === "null"){
48+
backendUrl = null;
49+
}
50+
if(webAppUrl === "null"){
51+
webAppUrl = null;
52+
}
53+
if(adminUrl === "null"){
54+
adminUrl = null;
55+
}
56+
57+
return [backendUrl, webAppUrl, adminUrl];
4458
};
4559

4660
const clearAuthJwt = (): void => {

0 commit comments

Comments
 (0)