mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Check hasOwnProperty before copying property
This commit is contained in:
@@ -528,7 +528,9 @@ namespace ts.server {
|
||||
// raw is now fixed and ready
|
||||
this.safelist = raw.typesMap;
|
||||
for (const key in raw.simpleMap) {
|
||||
this.legacySafelist[key] = raw.simpleMap[key].toLowerCase();
|
||||
if (raw.simpleMap.hasOwnProperty(key)) {
|
||||
this.legacySafelist[key] = raw.simpleMap[key].toLowerCase();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user