Check hasOwnProperty before copying property
This commit is contained in:
parent
9cbe4eb614
commit
71e07df817
1 changed files with 3 additions and 1 deletions
|
@ -528,9 +528,11 @@ namespace ts.server {
|
|||
// raw is now fixed and ready
|
||||
this.safelist = raw.typesMap;
|
||||
for (const key in raw.simpleMap) {
|
||||
if (raw.simpleMap.hasOwnProperty(key)) {
|
||||
this.legacySafelist[key] = raw.simpleMap[key].toLowerCase();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
this.logger.info(`Error loading types map: ${e}`);
|
||||
this.safelist = defaultTypeSafeList;
|
||||
|
|
Loading…
Reference in a new issue