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>(
353353export function getLocaleChain < Message = string > (
354354 ctx : CoreCommonContext < Message > ,
355355 fallback : FallbackLocale ,
356- start : Locale = ''
356+ start : Locale
357357) : Locale [ ] {
358358 const context = ( ctx as unknown ) as CoreInternalContext
359359
360- if ( start === '' ) {
361- return [ ]
362- }
363-
364360 if ( ! context . __localeChainCache ) {
365361 context . __localeChainCache = new Map ( )
366362 }
Original file line number Diff line number Diff line change @@ -204,6 +204,10 @@ describe('getLocaleChain', () => {
204204 } )
205205
206206 describe ( `simple: 'en'` , ( ) => {
207+ test ( 'empty string' , ( ) => {
208+ expect ( getLocaleChain ( ctx , 'en' , '' ) ) . toEqual ( [ 'en' ] )
209+ } )
210+
207211 test ( 'en' , ( ) => {
208212 expect ( getLocaleChain ( ctx , 'en' , 'en' ) ) . toEqual ( [ 'en' ] )
209213 } )
You can’t perform that action at this time.
0 commit comments