mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
[Bug] Cookies being fetched improperly
This commit is contained in:
parent
65bb58a635
commit
6ce59ecbd9
@ -25,9 +25,9 @@ export function getCookie(cName: string): string {
|
||||
const ca = document.cookie.split(";");
|
||||
// Check all cookies in the document and see if any of them match, grabbing the first one whose value lines up
|
||||
for (const c of ca) {
|
||||
const cTrimmed = c.trim();
|
||||
const cTrimmed = c.trimStart();
|
||||
if (cTrimmed.startsWith(name)) {
|
||||
return c.slice(name.length, c.length);
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user