refactor(ui): remove unnecessary checks (i18n is always defined)
This commit is contained in:
@@ -220,9 +220,7 @@ const sharedView = {
|
||||
</div>
|
||||
`;
|
||||
|
||||
if (i18n?.translateElement) {
|
||||
i18n.translateElement(container);
|
||||
}
|
||||
i18n.translateElement(container);
|
||||
},
|
||||
|
||||
// Attach event listeners
|
||||
@@ -662,8 +660,7 @@ const sharedView = {
|
||||
},
|
||||
|
||||
translate(key, defaultText) {
|
||||
if (i18n?.t) return i18n.t(key, defaultText);
|
||||
return defaultText;
|
||||
return i18n.t(key, defaultText);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user