From 1aabf6eea6b1d3a4dcd4339f817e1d164983529c Mon Sep 17 00:00:00 2001 From: Yurii Date: Sat, 14 Mar 2026 09:42:10 +0200 Subject: [PATCH] translate options use null coalesce --- client/src/language.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/src/language.js b/client/src/language.js index 6728ff4fdc..a6d4fcad88 100644 --- a/client/src/language.js +++ b/client/src/language.js @@ -139,13 +139,9 @@ class Language { * @returns {string} */ translateOption(value, field, scope) { - let translation = this.translate(field, 'options', scope); + const map = this.translate(field, 'options', scope) ?? {}; - if (typeof translation !== 'object') { - translation = {}; - } - - return translation[value] || value; + return map[value] || value; } /**