fix: adds a hasOwnProperty check, uses "let".

This commit is contained in:
Boris Grozev 2017-07-05 16:31:50 -05:00
parent b09613b943
commit 4840db67ca
1 changed files with 5 additions and 2 deletions

View File

@ -125,8 +125,11 @@ class Analytics {
// optionally include local deployment information based on // optionally include local deployment information based on
// the contents of window.config.deploymentInfo // the contents of window.config.deploymentInfo
if (config.deploymentInfo) { if (config.deploymentInfo) {
for (var key in config.deploymentInfo) { for (let key in config.deploymentInfo) {
permanentProperties[key] = config.deploymentInfo[key]; if (config.deploymentInfo.hasOwnProperty(key)) {
permanentProperties[key]
= config.deploymentInfo[key];
}
} }
} }