edit per suggestion

This commit is contained in:
Samuel Casellas 2025-01-08 22:26:41 -05:00
parent 8842b156a6
commit e64442a373

View File

@ -227,7 +227,7 @@ window.helpers = window.helpers || {
const matchedCookie = document.cookie.split('; ').find(cookie => cookie.startsWith(cookiePrefix));
if (matchedCookie) {
const cookieBody = matchedCookie.replace(cookiePrefix, '');
if (!cookieBody.length) return;
if (cookieBody.length === 0) return;
try {
return JSON.parse(decodeURIComponent(cookieBody));
} catch {