mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
The parsed jsaction action map, the parser cache keyed by the raw jsaction attribute value, and the fallback in getDefaulted were all plain {} objects. Looking up a key that was never explicitly set but happens to match an inherited Object.prototype member (toString, constructor, hasOwnProperty, ...) resolves to that inherited value instead of undefined, and callers only check `!== undefined` to decide whether there's a real action or cache entry.
Use Object.create(null) instead, which has no prototype to accidentally collide with.
(cherry picked from commit 8d8859cb21)