@@ -15,7 +15,7 @@ import { ScopeResolver } from './scope-resolver';
15
15
} )
16
16
export class TranslocoPipe implements PipeTransform , OnDestroy {
17
17
private subscription : Subscription | null = null ;
18
- private lastValue : string | undefined ;
18
+ private lastValue : string = '' ;
19
19
private lastKey : string | undefined ;
20
20
private listenToLangChange : boolean ;
21
21
private path : string ;
@@ -54,8 +54,10 @@ export class TranslocoPipe implements PipeTransform, OnDestroy {
54
54
active : activeLang
55
55
} ) ;
56
56
57
- return Array . isArray ( this . providerScope ) ?
58
- forkJoin ( ( < TranslocoScope [ ] > this . providerScope ) . map ( providerScope => this . resolveScope ( lang , providerScope ) ) )
57
+ return Array . isArray ( this . providerScope )
58
+ ? forkJoin (
59
+ ( < TranslocoScope [ ] > this . providerScope ) . map ( providerScope => this . resolveScope ( lang , providerScope ) )
60
+ )
59
61
: this . resolveScope ( lang , this . providerScope ) ;
60
62
} ) ,
61
63
listenOrNotOperator ( this . listenToLangChange )
@@ -76,9 +78,9 @@ export class TranslocoPipe implements PipeTransform, OnDestroy {
76
78
}
77
79
78
80
private resolveScope ( lang : string , providerScope : TranslocoScope ) : Observable < Translation | Translation [ ] > {
79
- let resolvedScope = this . scopeResolver . resolve ( { inline : undefined , provider : providerScope } ) ;
80
- this . path = this . langResolver . resolveLangPath ( lang , resolvedScope ) ;
81
- const inlineLoader = resolveInlineLoader ( providerScope , resolvedScope ) ;
82
- return this . translocoService . _loadDependencies ( this . path , inlineLoader ) ;
81
+ let resolvedScope = this . scopeResolver . resolve ( { inline : undefined , provider : providerScope } ) ;
82
+ this . path = this . langResolver . resolveLangPath ( lang , resolvedScope ) ;
83
+ const inlineLoader = resolveInlineLoader ( providerScope , resolvedScope ) ;
84
+ return this . translocoService . _loadDependencies ( this . path , inlineLoader ) ;
83
85
}
84
86
}
0 commit comments