소스 검색

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

master
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…
취소
저장