File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,6 @@ type I18nextIntegration = {
39
39
40
40
const identity = ( ( key : string ) => key ) as TFunction ;
41
41
42
- const defaultVariables = createStore ( { } , { serialize : 'ignore' } ) ;
43
-
44
42
export function createI18nextIntegration ( {
45
43
instance,
46
44
setup,
@@ -177,14 +175,14 @@ export function createI18nextIntegration({
177
175
variables ?: Record < string , Store < string > >
178
176
) : Store < string > {
179
177
return combine (
180
- $t ,
181
- variables ? combine ( variables ) : defaultVariables ,
182
- ( t , vars ) =>
178
+ { t : $t , variables : combine ( variables ?? { } ) } ,
179
+ ( { t, variables } ) =>
183
180
t (
181
+ key ,
184
182
key ,
185
183
// since i18next@25 t-function mutates variables object,
186
184
// so we spread it to avoid mutating original object
187
- { ...vars }
185
+ { ...variables }
188
186
) ?? key
189
187
) ;
190
188
}
You can’t perform that action at this time.
0 commit comments