[object Object]

← back to Dw Design Bridge

fix: guard renderDesign against malformed/undefined design entries

9ada06ea414b45e290077a0b7e9e4bc0b010a4a5 · 2026-05-18 20:24:17 -0700 · SteveStudio2

Files touched

Diff

commit 9ada06ea414b45e290077a0b7e9e4bc0b010a4a5
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:24:17 2026 -0700

    fix: guard renderDesign against malformed/undefined design entries
---
 public/index.html | 1 +
 1 file changed, 1 insertion(+)

diff --git a/public/index.html b/public/index.html
index 216098c..b384f4e 100644
--- a/public/index.html
+++ b/public/index.html
@@ -91,6 +91,7 @@ async function refresh() {
 }
 
 function renderDesign(d, jobId, idx) {
+  if (!d || typeof d !== 'object') return '';
   const palette = (d.palette || []).map(c => `<span style="background:${escapeHtml(c)}"></span>`).join('');
   const previewSrc = jobId != null && idx != null ? `/jobs/${jobId}/${idx}.svg` : '';
   return `<div class="design">

← dd16961 snapshot: 17 file(s) changed, +16 new, ~1 modified  ·  back to Dw Design Bridge  ·  untrack node_modules (git hygiene) ed3cde3 →