Closed SuromiDev closed 2 weeks ago
Instead of doing value == null
, do !value
.
The getCookie function can also return an empty string if the cookie is there, but empty. I'm pretty sure logging out works by expiring the cookies, but I feel like checking with !
is better off doing anyways.
I tested this too:
LGTM
Using
null
instead of""
fixes the issue where the user didn't get the registration/login popup due to the client expectingsession
anduserid
values in cookies to be""
. Ifsession
anduserid
weren't created in cookies, it would attempt to connect to a nonexistent session.