Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
fix: add hasOwnProperty check
Browse files Browse the repository at this point in the history
  • Loading branch information
guangwong committed Dec 11, 2018
1 parent 3004225 commit 19617c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/metrics/src/common/MetricName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export class MetricName {
let tagsArr = [];

for(let key in this.tags) {
tagsArr.push(key + MetricName.TAGS_CONCAT + this.tags[key]);
if(this.tags.hasOwnProperty(key)) {
tagsArr.push(key + MetricName.TAGS_CONCAT + this.tags[key]);
}
}

tagsArr.sort();
Expand Down

0 comments on commit 19617c1

Please sign in to comment.