From 62f9d3820cd1ef8495b18cc30db6d45e50710fa9 Mon Sep 17 00:00:00 2001 From: Lapis <45414333+Lapis256@users.noreply.github.com> Date: Fri, 29 Apr 2022 16:38:27 +0900 Subject: [PATCH] fix --- behavior/scripts/src/ui.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/behavior/scripts/src/ui.js b/behavior/scripts/src/ui.js index b319b62..e876b6c 100644 --- a/behavior/scripts/src/ui.js +++ b/behavior/scripts/src/ui.js @@ -17,17 +17,14 @@ export async function InputSingleText( placeholderText, defaultValue ) { - const { - isCanceled, - formValues: [text], - } = await new ModalFormData() + const { isCanceled, formValues } = await new ModalFormData() .title(title) .textField(label, placeholderText, defaultValue) .show(player); if (isCanceled) return; - if (text === "") { + if (formValues[0] === "") { return await InputSingleText( player, title, @@ -36,5 +33,5 @@ export async function InputSingleText( defaultValue ); } - return text; + return formValues[0]; }