DeepL: fixed NPE

pull/214/head
M66B 2 years ago
parent 05b950a95b
commit 5ded10a29a

@ -347,7 +347,7 @@ public class DeepL {
} }
private static String getBaseUri(String key) { private static String getBaseUri(String key) {
String domain = (key.endsWith(":fx") ? "api-free.deepl.com" : "api.deepl.com"); String domain = (key != null && key.endsWith(":fx") ? "api-free.deepl.com" : "api.deepl.com");
return "https://" + domain + "/v2/"; return "https://" + domain + "/v2/";
} }

Loading…
Cancel
Save