File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -353,14 +353,10 @@ export function handleMissing<Message = string>(
353
353
export function getLocaleChain < Message = string > (
354
354
ctx : CoreCommonContext < Message > ,
355
355
fallback : FallbackLocale ,
356
- start : Locale = ''
356
+ start : Locale
357
357
) : Locale [ ] {
358
358
const context = ( ctx as unknown ) as CoreInternalContext
359
359
360
- if ( start === '' ) {
361
- return [ ]
362
- }
363
-
364
360
if ( ! context . __localeChainCache ) {
365
361
context . __localeChainCache = new Map ( )
366
362
}
Original file line number Diff line number Diff line change @@ -204,6 +204,10 @@ describe('getLocaleChain', () => {
204
204
} )
205
205
206
206
describe ( `simple: 'en'` , ( ) => {
207
+ test ( 'empty string' , ( ) => {
208
+ expect ( getLocaleChain ( ctx , 'en' , '' ) ) . toEqual ( [ 'en' ] )
209
+ } )
210
+
207
211
test ( 'en' , ( ) => {
208
212
expect ( getLocaleChain ( ctx , 'en' , 'en' ) ) . toEqual ( [ 'en' ] )
209
213
} )
You can’t perform that action at this time.
0 commit comments