mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
3dd433b39a
Calling `.hasOwnProperty()` on an object created with `Object.create(null)`
throws a TypeError because such objects have no prototype and therefore no
inherited `hasOwnProperty` method. Replace it with `Object.hasOwn()`, which
is a static method immune to prototype chain issues.
Adds a regression test covering null-prototype objects passed to
`toStylingKeyValueArray`.
(cherry picked from commit a786862c54)