Преглед изворни кода

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

j8
Boris Grozev пре 8 година
родитељ
комит
4840db67ca
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5
    2
      modules/analytics/analytics.js

+ 5
- 2
modules/analytics/analytics.js Прегледај датотеку

125
                  // optionally include local deployment information based on
125
                  // optionally include local deployment information based on
126
                  // the contents of window.config.deploymentInfo
126
                  // the contents of window.config.deploymentInfo
127
                 if (config.deploymentInfo) {
127
                 if (config.deploymentInfo) {
128
-                    for (var key in config.deploymentInfo) {
129
-                        permanentProperties[key] = config.deploymentInfo[key];
128
+                    for (let key in config.deploymentInfo) {
129
+                        if (config.deploymentInfo.hasOwnProperty(key)) {
130
+                            permanentProperties[key]
131
+                                = config.deploymentInfo[key];
132
+                        }
130
                     }
133
                     }
131
                 }
134
                 }
132
 
135
 

Loading…
Откажи
Сачувај