Skip to content

Commit

Permalink
Fix bug where exception tracking can leak fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
calebegg committed Mar 27, 2017
1 parent 241b46f commit 811a683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
ga('create', '{{GA_ID}}', 'auto');
window.onerror = function (message, source, lineno, colno, error) {
try {
// Some browsers include fragment in source location for errors in
// index.html.
source = source.split('#')[0];
ga('send', 'exception',
{exDescription: message + '\n' + source + ': ' + lineno + ',' + colno,
exFatal: true});
Expand Down

0 comments on commit 811a683

Please sign in to comment.