mirror of
https://github.com/XFox111/my-website.git
synced 2026-04-22 07:28:01 +03:00
fix: incorrect cookie value return
This commit is contained in:
@@ -35,7 +35,7 @@ function getCookie(name: string): string | undefined
|
|||||||
|
|
||||||
for (const cookie of cookies)
|
for (const cookie of cookies)
|
||||||
if (cookie.trim().startsWith(cookieName))
|
if (cookie.trim().startsWith(cookieName))
|
||||||
return cookie.substring(cookieName.length);
|
return cookie.trim().substring(cookieName.length);
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user