From 5f3640c7fd88a98d3c278e17d4bd91b836962395 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sun, 5 Feb 2023 20:29:10 +0900
Subject: fix(client): validate input response in aiscript

---
 packages/frontend/src/widgets/WidgetAiscriptApp.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/widgets/WidgetAiscriptApp.vue')

diff --git a/packages/frontend/src/widgets/WidgetAiscriptApp.vue b/packages/frontend/src/widgets/WidgetAiscriptApp.vue
index 406fb92d86..9a2b60eb05 100644
--- a/packages/frontend/src/widgets/WidgetAiscriptApp.vue
+++ b/packages/frontend/src/widgets/WidgetAiscriptApp.vue
@@ -67,7 +67,11 @@ async function run() {
 				os.inputText({
 					title: q,
 				}).then(({ canceled, result: a }) => {
-					ok(a);
+					if (canceled) {
+						ok('');
+					} else {
+						ok(a);
+					}
 				});
 			});
 		},
-- 
cgit v1.3.1-freya

