File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
projects/ngx-translate/core/src/lib Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export class TranslateService {
169
169
170
170
if ( typeof pending !== "undefined" ) {
171
171
// on init set the defaultLang immediately
172
- if ( ! this . defaultLang ) {
172
+ if ( this . defaultLang == null ) {
173
173
this . defaultLang = lang ;
174
174
}
175
175
@@ -340,7 +340,7 @@ export class TranslateService {
340
340
res = this . parser . interpolate ( this . parser . getValue ( translations , key ) , interpolateParams ) ;
341
341
}
342
342
343
- if ( typeof res === "undefined" && this . defaultLang && this . defaultLang !== this . currentLang && this . useDefaultLang ) {
343
+ if ( typeof res === "undefined" && this . defaultLang != null && this . defaultLang !== this . currentLang && this . useDefaultLang ) {
344
344
res = this . parser . interpolate ( this . parser . getValue ( this . translations [ this . defaultLang ] , key ) , interpolateParams ) ;
345
345
}
346
346
@@ -438,7 +438,7 @@ export class TranslateService {
438
438
this . onLangChange . emit ( { lang : lang , translations : this . translations [ lang ] } ) ;
439
439
440
440
// if there is no default lang, use the one that we just set
441
- if ( ! this . defaultLang ) {
441
+ if ( this . defaultLang == null ) {
442
442
this . changeDefaultLang ( lang ) ;
443
443
}
444
444
}
You can’t perform that action at this time.
0 commit comments