mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Return empty string instead of empty html element for empty text
This commit is contained in:
@@ -322,7 +322,8 @@ export function coreLocalizer() {
|
||||
// Returns the localized text wrapped in an HTML element encoding the locale info
|
||||
localizer.t.html = function(stringId, replacements, locale) {
|
||||
const info = localizer.tInfo(stringId, replacements, locale);
|
||||
return localizer.htmlForLocalizedText(info.text, info.locale);
|
||||
// text may be empty or undefined if `replacements.default` is
|
||||
return info.text ? localizer.htmlForLocalizedText(info.text, info.locale) : '';
|
||||
};
|
||||
|
||||
localizer.htmlForLocalizedText = function(text, localeCode) {
|
||||
|
||||
Reference in New Issue
Block a user