From 40877241fea05351ae032f93d3e09e4b8368aa91 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 26 Sep 2022 19:19:46 +0200 Subject: [PATCH] Fixed DeepL translation when using empty text --- I18N Commander/Processor/DeepL.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/I18N Commander/Processor/DeepL.cs b/I18N Commander/Processor/DeepL.cs index 49be452..3e7d8fd 100644 --- a/I18N Commander/Processor/DeepL.cs +++ b/I18N Commander/Processor/DeepL.cs @@ -39,6 +39,9 @@ public static class DeepL { if (DEEPL_NOT_AVAILABLE) return string.Empty; + + if (string.IsNullOrWhiteSpace(text)) + return string.Empty; if (await AppSettings.GetDeepLMode() == SettingDeepLMode.DISABLED) return string.Empty;