From 975ea23d6f49a4043131f79036d1bf5166eb9140 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Tue, 4 Mar 2025 15:46:25 +0100 Subject: [PATCH] fix: display all available settings (#16798) Fixes: https://github.com/coder/coder/issues/15420 --- site/src/pages/DeploymentSettingsPage/OptionsTable.tsx | 7 ------- site/src/pages/DeploymentSettingsPage/optionValue.ts | 5 ++++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/site/src/pages/DeploymentSettingsPage/OptionsTable.tsx b/site/src/pages/DeploymentSettingsPage/OptionsTable.tsx index 0cf3534a53..ea9fadb4b0 100644 --- a/site/src/pages/DeploymentSettingsPage/OptionsTable.tsx +++ b/site/src/pages/DeploymentSettingsPage/OptionsTable.tsx @@ -49,13 +49,6 @@ const OptionsTable: FC = ({ options, additionalValues }) => { {Object.values(options).map((option) => { - if ( - option.value === null || - option.value === "" || - option.value === undefined - ) { - return null; - } return ( diff --git a/site/src/pages/DeploymentSettingsPage/optionValue.ts b/site/src/pages/DeploymentSettingsPage/optionValue.ts index b959814dcc..7e689c0e83 100644 --- a/site/src/pages/DeploymentSettingsPage/optionValue.ts +++ b/site/src/pages/DeploymentSettingsPage/optionValue.ts @@ -51,6 +51,10 @@ export function optionValue( break; } + if (!option.value) { + return ""; + } + // We show all experiments (including unsafe) that are currently enabled on a deployment // but only show safe experiments that are not. // biome-ignore lint/suspicious/noExplicitAny: opt.value is any @@ -59,7 +63,6 @@ export function optionValue( experimentMap[v] = true; } } - return experimentMap; } default: