Skip to content

Commit

Permalink
chore: edit after review
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Jan 11, 2023
1 parent a0d2616 commit 4f091cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/merge-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function mergeLocales(locales: LocaleDefinition[]): LocaleDefinition {
if (typeof locale[key] === 'object') {
merged[key] = { ...locale[key], ...merged[key] };
} else {
// Do nothing
// Primitive values cannot be not merged
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/utils/merge-locales.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { LocaleDefinition } from '../../src';
import { mergeLocales } from '../../src/utils/merge-locales';

describe('mergeLocales', () => {
it('should overwrite locales', () => {
it('should not overwrite entries', () => {
const locale1: LocaleDefinition = {
title: 'a',
person: { firstName: ['a'] },
Expand All @@ -29,7 +29,7 @@ describe('mergeLocales', () => {
});
});

it('should extend locales', () => {
it('should extend categories', () => {
const locale1: LocaleDefinition = {
title: 'a',
location: { city: ['a'] },
Expand Down

0 comments on commit 4f091cc

Please sign in to comment.