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

Commit

Permalink
Merge pull request #33009 from tamarahills/bugfix/1221867-fix-custom-…
Browse files Browse the repository at this point in the history
…hist-with-multiple-underscores

Bug 1221867 - Use a regexp to globally replace underscores in histogr…
  • Loading branch information
tamarahills committed Nov 5, 2015
2 parents f39a7a8 + 4fdb6cc commit 65973b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shared/js/advanced_telemetry_helper.js
Expand Up @@ -130,9 +130,10 @@
this.metricType = type;
if (typeof name !== 'undefined') {
var varCount = 2;
var re = /_/g;
var message = APP_TELEMETRY_LOG_PREFIX;
// Disallow underscores so telemetry system can parse it.
this.metricName = name.replace('_', '-');
this.metricName = name.replace(re, '-');
message += '|' + this.metricName;
message += '|' + type + '|';
if (typeof min !== 'undefined') { varCount++; }
Expand Down

0 comments on commit 65973b6

Please sign in to comment.