From d130f956ee218cefd96f48b3df2c1f78b893f577 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 6 Jul 2024 18:05:16 +0300 Subject: [PATCH] symmetric-input-output: Do not change input if returning undefined --- src/lib/components/symmetric-input-output.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/components/symmetric-input-output.svelte b/src/lib/components/symmetric-input-output.svelte index 672efc5..95090d0 100644 --- a/src/lib/components/symmetric-input-output.svelte +++ b/src/lib/components/symmetric-input-output.svelte @@ -56,7 +56,10 @@ inputLog = ""; if (value) { - ({ output: inputText, log: outputLog } = handleErrors(from, value)); + const result = handleErrors(from, value); + if (result.output) { + ({ output: inputText, log: outputLog } = result); + } } else { inputText = ""; outputLog = "";