From cecb4d97cd55c6b276c5896c2570ca50e03b7d1e Mon Sep 17 00:00:00 2001 From: Jage9 Date: Sat, 21 Feb 2026 23:21:40 -0500 Subject: [PATCH] Fix item property display to prefer item overrides --- client/public/version.js | 2 +- client/src/main.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/public/version.js b/client/public/version.js index 4a67ac3..ea5ff6b 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.22 R131"; +window.CHGRID_WEB_VERSION = "2026.02.22 R132"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/main.ts b/client/src/main.ts index 0cee372..7819fe7 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -738,9 +738,11 @@ function getItemPropertyValue(item: WorldItem, key: string): string { if (!Number.isFinite(parsed)) return '15'; return String(Math.round(parsed)); } + const paramValue = item.params[key]; + if (paramValue !== undefined) return String(paramValue); const globalValue = getItemTypeGlobalProperties(item.type)?.[key]; if (globalValue !== undefined) return String(globalValue); - return String(item.params[key] ?? ''); + return ''; } function inferItemPropertyValueType(item: WorldItem, key: string): string | undefined {