fix(translate): prevent crash caused by execution order

This commit is contained in:
Johannes Frohnmeyer 2023-12-06 19:04:39 +01:00
parent 45f101f9ec
commit 746a8e2536
Signed by: Johannes
GPG Key ID: E76429612C2929F4

View File

@ -12,7 +12,7 @@ public class TranslateConfig implements JfCustomConfig {
public static void ensureValid() {
if (translationService == null) translationService = GoogleTranslateService.NAME;
if (translationService.equals(LibreTranslateService.NAME) && libreTranslateHost == null || libreTranslateHost.isBlank())
if (translationService.equals(LibreTranslateService.NAME) && (libreTranslateHost == null || libreTranslateHost.isBlank()))
translationService = GoogleTranslateService.NAME;
}