From 40d717e4df8e24516f36057477d156778d52a5c6 Mon Sep 17 00:00:00 2001 From: jelveh Date: Thu, 16 Jul 2026 19:42:45 -0700 Subject: [PATCH] fix: prevent crash rendering website files without a workers array in Dashboard Files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TabFiles.renderItem accessed `file.workers.length` unguarded when deciding whether to show the website badge. Directory entries that have a published website but no `workers` array (the common case) made this throw `Cannot read properties of undefined (reading 'length')`, so the row failed to render — the file silently disappeared from the list (swallowed by the Promise.allSettled batch) or was never added on socket-driven updates. The sibling `is_worker` derivation on the same entry already guards with `file.workers?.length`, and the desktop reference (UIItem.js) normalizes `workers` to an array and shows the badge via `!is_worker`. Reuse the safe `is_worker` flag here instead of touching `file.workers.length` directly. --- src/gui/src/UI/Dashboard/TabFiles.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 11e3d5075..62802d166 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -2050,9 +2050,9 @@ const TabFiles = { ${icon}
-