Skip to content

Commit

Permalink
Merge pull request #96 from glogiotatidis/1124471
Browse files Browse the repository at this point in the history
Call callback even if we're not sending the metric.
  • Loading branch information
glogiotatidis committed Feb 12, 2015
2 parents 68406da + 1f5ec7a commit a79c21a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions snippets/base/templates/base/includes/snippet_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,10 @@
return;
{% endif %}

if (Math.random() > SNIPPET_METRICS_SAMPLE_RATE) {
return;
}

if (!metric) {
if ((Math.random() > SNIPPET_METRICS_SAMPLE_RATE) || (!metric)) {
if (callback) {
callback();
}
return;
}

Expand Down

0 comments on commit a79c21a

Please sign in to comment.