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 {
169169
170170 if ( typeof pending !== "undefined" ) {
171171 // on init set the defaultLang immediately
172- if ( ! this . defaultLang ) {
172+ if ( this . defaultLang == null ) {
173173 this . defaultLang = lang ;
174174 }
175175
@@ -340,7 +340,7 @@ export class TranslateService {
340340 res = this . parser . interpolate ( this . parser . getValue ( translations , key ) , interpolateParams ) ;
341341 }
342342
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 ) {
344344 res = this . parser . interpolate ( this . parser . getValue ( this . translations [ this . defaultLang ] , key ) , interpolateParams ) ;
345345 }
346346
@@ -438,7 +438,7 @@ export class TranslateService {
438438 this . onLangChange . emit ( { lang : lang , translations : this . translations [ lang ] } ) ;
439439
440440 // if there is no default lang, use the one that we just set
441- if ( ! this . defaultLang ) {
441+ if ( this . defaultLang == null ) {
442442 this . changeDefaultLang ( lang ) ;
443443 }
444444 }
You can’t perform that action at this time.
0 commit comments