You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Don't modify original options arg
This commit is contained in:
@ -67,8 +67,7 @@ function safeCounterpartTranslate(text, options) {
|
|||||||
if (translated === undefined && count !== undefined) {
|
if (translated === undefined && count !== undefined) {
|
||||||
// counterpart does not do fallback if no pluralisation exists
|
// counterpart does not do fallback if no pluralisation exists
|
||||||
// in the preferred language, so do it here
|
// in the preferred language, so do it here
|
||||||
options.locale = 'en';
|
translated = counterpart.translate(text, Object.assign({}, options, {locale: 'en'}));
|
||||||
translated = counterpart.translate(text, options);
|
|
||||||
}
|
}
|
||||||
return translated;
|
return translated;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user