Skip to content

Commit

Permalink
common: add hasOwnProperty to for...in loop. Fixes #1984. (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
AKPWebDesign authored and stephenplusplus committed Feb 14, 2017
1 parent b27d9b3 commit 4789a78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/common/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ function replaceProjectIdToken(value, projectId) {

if (is.object(value)) {
for (var opt in value) {
value[opt] = replaceProjectIdToken(value[opt], projectId);
if (value.hasOwnProperty(opt)) {
value[opt] = replaceProjectIdToken(value[opt], projectId);
}
}
}

Expand Down

0 comments on commit 4789a78

Please sign in to comment.