[misc] work around context assignments by i18n that leak across requests
Somewhere in i18next there is an assignment `ctx.lng=someLang` that
leaks across requests that share the same `ctx` object for calls like
`req.i18n.translate('locale', ctx)`.
This somewhere is likely here:
https://github.com/i18next/i18next/blob/6cc8917ed5b7a1a6e5db316644fe57474c150f18/src/i18next.translate.js#L338
GitOrigin-RevId: b05f62fa59a6ffa59724108fbcc68cc7a67cfd8f
This commit is contained in:
@@ -215,7 +215,7 @@ const UserPagesController = {
|
||||
const data = providers[provider]
|
||||
data.description = req.i18n.translate(
|
||||
data.descriptionKey,
|
||||
data.descriptionOptions
|
||||
Object.assign({}, data.descriptionOptions)
|
||||
)
|
||||
result[provider] = data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user