mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add check if the compilationSetting object hasOwnProperty before add the property to TypeScriptLS object
This commit is contained in:
@@ -248,7 +248,9 @@ module Harness.LanguageService {
|
||||
|
||||
public setCompilationSettings(settings: any) {
|
||||
for (var key in settings) {
|
||||
this.settings[key] = settings[key];
|
||||
if (settings.hasOwnProperty(key)) {
|
||||
this.settings[key] = settings[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user