Kaynağa Gözat

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

j8
Boris Grozev 8 yıl önce
ebeveyn
işleme
4840db67ca
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5
    2
      modules/analytics/analytics.js

+ 5
- 2
modules/analytics/analytics.js Dosyayı Görüntüle

@@ -125,8 +125,11 @@ class Analytics {
125 125
                  // optionally include local deployment information based on
126 126
                  // the contents of window.config.deploymentInfo
127 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…
İptal
Kaydet