mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
5de0ea5f23
loadTranslations stores parsed translations into the shared global $localize.TRANSLATIONS keyed by message id. Those ids come verbatim from the translations map (typically parsed from a translation file), so a translation whose id is __proto__ assigns through the inherited __proto__ setter, reparenting the map rather than storing the entry (and throwing under --disable-proto=throw). Create the map with Object.create(null) in loadTranslations and clearTranslations so __proto__ is an ordinary key.