Skip to content

Commit 8de9b20

Browse files
committed
chore(*): Small tweak to lang tag check.
1 parent 890b48f commit 8de9b20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular-elements/src/app/custom-strategy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
529529
if (localeStringsInput) {
530530
const closestElement = componentRef.location.nativeElement.closest('[lang]') as HTMLElement;
531531
if (closestElement) {
532-
const lang = closestElement ? closestElement.lang.toUpperCase() : 'EN';
532+
// Do not assign anything if no tag found. By default all grids have assigned EN resource strings.
533+
const lang = closestElement.lang.toUpperCase();
533534
const resourceStrings = GridLocaleConfig.has(lang) ? GridLocaleConfig.get(lang) : componentRef.instance[localeStringsInput.propName];
534535
componentRef.instance[localeStringsInput.propName] = resourceStrings;
535536
}

0 commit comments

Comments
 (0)