Check hasOwnProperty before copying property

This commit is contained in:
Andrew Casey 2017-11-20 18:43:14 -08:00
parent 9cbe4eb614
commit 71e07df817

View file

@ -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) {