Skip to content

Commit 32ead6a

Browse files
Andrea Barbassovins01-4science
authored andcommitted
[DSC-758] refactor language detection in locale service
1 parent 8f1627c commit 32ead6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/core/locale/locale.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class LocaleService {
5151
*/
5252
initDefaults() {
5353
this.routeService.getQueryParameterValue('lang').subscribe(lang => {
54-
if (lang && this.translate.getLangs().some(language => language === lang)) {
54+
if (lang && this.translate.getLangs().includes(lang)) {
5555
this.setCurrentLanguageCode(lang);
5656
}
5757
});

0 commit comments

Comments
 (0)