diff --git a/viz/app.js b/viz/app.js index 5b962ba..03fcd60 100644 --- a/viz/app.js +++ b/viz/app.js @@ -115,7 +115,7 @@ function route() { const h = location.hash || "#/"; const parts = h.replace(/^#\/?/, "").split("/").filter(Boolean); if (parts.length === 0) return renderSearch(); - if (parts[0] === "item" && parts[1]) return renderItem(parts[1]); + if (parts[0] === "item" && parts[1]) return renderItem(decodeURIComponent(parts[1])); return renderSearch(); } @@ -337,6 +337,7 @@ function renderSearch() { el.addEventListener("click", () => { const sku = el.getAttribute("data-sku") || ""; if (!sku) return; + console.log("[nav] skuKey=", sku, "hash=", `#/item/${encodeURIComponent(sku)}`); saveQuery($q.value); location.hash = `#/item/${encodeURIComponent(sku)}`; }); @@ -391,7 +392,7 @@ function renderSearch() {