refactor(compiler): use Object.keys instead of Object.getOwnPropertyNames (#10498)
This commit is contained in:

committed by
Alex Rickabaugh

parent
fd19671c07
commit
cd18de7a21
@ -87,8 +87,8 @@ export class NgPlural {
|
||||
_updateView(): void {
|
||||
this._clearViews();
|
||||
|
||||
var key = getPluralCategory(
|
||||
this._switchValue, Object.getOwnPropertyNames(this._caseViews), this._localization);
|
||||
var key =
|
||||
getPluralCategory(this._switchValue, Object.keys(this._caseViews), this._localization);
|
||||
this._activateView(this._caseViews[key]);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ export class I18nPluralPipe implements PipeTransform {
|
||||
throw new InvalidPipeArgumentException(I18nPluralPipe, pluralMap);
|
||||
}
|
||||
|
||||
const key = getPluralCategory(value, Object.getOwnPropertyNames(pluralMap), this._localization);
|
||||
const key = getPluralCategory(value, Object.keys(pluralMap), this._localization);
|
||||
|
||||
return StringWrapper.replaceAll(pluralMap[key], _INTERPOLATION_REGEXP, value.toString());
|
||||
}
|
||||
|
Reference in New Issue
Block a user