From 438958a3d56c06fcf63306cd381f33848685611b Mon Sep 17 00:00:00 2001 From: Christopher Dieringer Date: Mon, 13 Nov 2023 11:49:43 -0800 Subject: [PATCH] fix: do not drop value in multi select --- lib/types/array.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/types/array.js b/lib/types/array.js index 31091e9..157e4e1 100644 --- a/lib/types/array.js +++ b/lib/types/array.js @@ -559,7 +559,8 @@ class ArrayPrompt extends Prompt { value = utils.reorder(value); } - this.value = multi ? value.map(ch => ch.name) : value.name; + const getValue = (ch) => "value" in ch ? ch.value : ch.name; + this.value = multi ? value.map(getValue) : getValue(value); return super.submit(); }