From 5e079b42f5aa6be9f2802245cbcc6213bdd8c219 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 1 Oct 2024 09:36:07 +0200 Subject: [PATCH] FIX: checkbox submission values exception --- .../discourse/components/wizard-table-field.js.es6 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-table-field.js.es6 b/assets/javascripts/discourse/components/wizard-table-field.js.es6 index 363648c2..d387b8b8 100644 --- a/assets/javascripts/discourse/components/wizard-table-field.js.es6 +++ b/assets/javascripts/discourse/components/wizard-table-field.js.es6 @@ -48,11 +48,10 @@ export default Component.extend({ checkboxValue(value) { const isCheckbox = this.get("isCheckbox"); if (isCheckbox) { - if (value.value.includes("true")) { - return true; - } else if (value.value.includes("false")) { - return false; - } + return ( + value.value === true || + (Array.isArray(value.value) && value.value.includes("true")) + ); } },