Sfoglia il codice sorgente

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

master
Boris Grozev 8 anni fa
parent
commit
4840db67ca
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5
    2
      modules/analytics/analytics.js

+ 5
- 2
modules/analytics/analytics.js Vedi File

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…
Annulla
Salva