From b28459c1cf0087da538f74cf67dd0bc6d9adcec4 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Tue, 23 Jan 2024 04:40:05 -0800 Subject: [PATCH] Oops, fix silly bug keeping the bulk list form open all the time Lol I forgot to interpolate the `value` variable into the cookie and just always set it to open lmao --- app/assets/javascripts/items/item_header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/items/item_header.js b/app/assets/javascripts/items/item_header.js index c230d933..05035428 100644 --- a/app/assets/javascripts/items/item_header.js +++ b/app/assets/javascripts/items/item_header.js @@ -1,6 +1,6 @@ function setFormStateCookie(value) { const thirtyDays = 60 * 60 * 24 * 30; - document.cookie = `DTIItemPageUserListsFormState=open;max-age=${thirtyDays}`; + document.cookie = `DTIItemPageUserListsFormState=${value};max-age=${thirtyDays}`; } const headers = document.querySelectorAll(".item-header");