File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/multi-http-loader/src/lib Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ export interface TranslationResource {
1212export class MultiTranslateHttpLoader implements TranslateLoader {
1313 constructor (
1414 private _handler : HttpBackend ,
15- private _resourcesPrefix : string [ ] | TranslationResource [ ] ,
15+ private _resourcesPrefix : ( string | TranslationResource ) [ ] ,
1616 ) { }
1717
1818 public getTranslation ( lang : string ) : Observable < any > {
1919 const requests : Observable < Object | { } > [ ] = this . _resourcesPrefix . map ( ( resource ) => {
2020 let path : string
2121
2222 if ( typeof resource === 'string' ) path = `${ resource } ${ lang } .json`
23- else path = `${ resource . prefix } ${ lang } ${ resource . suffix || '.json' } `
23+ else path = `${ resource . prefix } ${ lang } ${ resource . suffix ?? '.json' } `
2424
2525 return new HttpClient ( this . _handler ) . get ( path ) . pipe (
2626 catchError ( ( res ) => {
You can’t perform that action at this time.
0 commit comments