diff --git a/packages/utils/src/extendDictionary.mts b/packages/utils/src/extendDictionary.mts index 4d44a81f..a36981b1 100644 --- a/packages/utils/src/extendDictionary.mts +++ b/packages/utils/src/extendDictionary.mts @@ -21,6 +21,6 @@ export const initExtendDictionary = base: Base, part: DeepPartial>, ): Translation => - extend({}, base, part) as Translation + extend(true, {}, base, part) as Translation export const extendDictionary = initExtendDictionary() diff --git a/packages/utils/src/extendDictionary.test.ts b/packages/utils/src/extendDictionary.test.ts index d086b397..58b0e32e 100644 --- a/packages/utils/src/extendDictionary.test.ts +++ b/packages/utils/src/extendDictionary.test.ts @@ -7,7 +7,7 @@ const test = suite('utils') const translation = { simple: 'Hello', - nested: { value: 'Hello nested' }, + nested: { value: 'Hello nested', otherValue: 'Hello nested again' }, } test('does no mutation', () => { @@ -37,6 +37,7 @@ test('simple extend', () => { simple: 'Hello extended', nested: { value: 'Hello nested', + otherValue: 'Hello nested again', }, }) }) @@ -47,6 +48,7 @@ test('nested extend', () => { simple: 'Hello', nested: { value: 'Hello nested extended', + otherValue: 'Hello nested again', }, }) }) @@ -60,6 +62,7 @@ test('nested extend with simple', () => { simple: 'Hello extended', nested: { value: 'Hello nested extended', + otherValue: 'Hello nested again', }, }) }) @@ -74,6 +77,7 @@ test('add prop', () => { add: 'test', nested: { value: 'Hello nested', + otherValue: 'Hello nested again', }, }) }) @@ -92,6 +96,7 @@ test('add nested prop', () => { }, nested: { value: 'Hello nested', + otherValue: 'Hello nested again', }, }) })