mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
8ce1fcf7fa
`translate()` looked up substitutions with `message.substitutions.hasOwnProperty(placeholder)`. A message whose placeholder is named `hasOwnProperty` stores that key on the plain substitutions object, shadowing the method, so the lookup calls the substitution value and throws a TypeError. Use `Object.hasOwn` instead, which resolves through `Object` and is unaffected by the shadowed key, matching the recent `I18nSelectPipe` fix.
(cherry picked from commit 2a4f582731)