fix(ui): guard storeLoginToken against empty/whitespace-only tokens

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hendrik Jaks 2026-03-13 12:06:43 +02:00
parent 06260df412
commit 35bd69e146

View file

@ -62,6 +62,7 @@ export function clearTokenCookies() {
*/
export function storeLoginToken(token: string) {
if (typeof window === "undefined") return;
if (!token || !token.trim()) return;
try {
sessionStorage.setItem("token", token);
} catch {