[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/03: prevent jed from throwing
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/03: prevent jed from throwing |
Date: |
Wed, 08 Jan 2025 19:37:36 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit c06e48ba01fa5d37e76dc7e3e1dadbbba6aba974
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Jan 8 15:03:35 2025 -0300
prevent jed from throwing
---
packages/taler-util/src/i18n.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/taler-util/src/i18n.ts b/packages/taler-util/src/i18n.ts
index 3c6f5ac57..1d3b30bc9 100644
--- a/packages/taler-util/src/i18n.ts
+++ b/packages/taler-util/src/i18n.ts
@@ -53,6 +53,8 @@ export function singular(
...values: any[]
): TranslatedString {
const s = toI18nString(stringSeq);
+ // jed throws a Error when key is empty
+ if (!s) return "" as TranslatedString;
const tr = jed
.translate(s)
.ifPlural(1, s)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.