[object Object]

← back to Nationalrealestate

usre deals: facet deselect uses undefined (not null) to match go()/rm/clear — one unset sentinel, refactor-safe (TK-10482 SHOULD-FIX)

504ae668a2fc558ab652f15f42ae07f96236d6f6 · 2026-08-12 08:46:00 -0700 · Steve Abrams

Files touched

Diff

commit 504ae668a2fc558ab652f15f42ae07f96236d6f6
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Aug 12 08:46:00 2026 -0700

    usre deals: facet deselect uses undefined (not null) to match go()/rm/clear — one unset sentinel, refactor-safe (TK-10482 SHOULD-FIX)
---
 public/deals.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/public/deals.html b/public/deals.html
index 65ad9bb..8e8d73d 100644
--- a/public/deals.html
+++ b/public/deals.html
@@ -176,7 +176,8 @@ function facetList(sel,dim,items){
   for(const it of items){
     const sel2=String(state[dim]||'')===String(it.key);
     const a=document.createElement('a');
-    a.className='facet'+(sel2?' sel':''); a.href=drillUrl({[dim]:sel2?null:it.key,offset:0});
+    // deselect uses `undefined` (not null) to match go()/rm/clear everywhere else — one unset sentinel so a future `in`-check refactor can't diverge the href vs onclick paths (TK-10482 SHOULD-FIX).
+    a.className='facet'+(sel2?' sel':''); a.href=drillUrl({[dim]:sel2?undefined:it.key,offset:0});
     a.innerHTML=`<span class="nm">${esc(it.label)}</span><span class="ct">${fmt(it.n)}</span>`;
     a.onclick=e=>{ e.preventDefault(); go({[dim]:sel2?undefined:String(it.key)}); };
     box.appendChild(a);

← 26fa1e5 usre: deals.html feed grid with full href-drill + /deal/:id  ·  back to Nationalrealestate  ·  ca_contractors: CSLB licensed-contractor registry schema (TK 1bdb0d9 →