Skip to content

Commit

Permalink
Check document.location before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
rmevans9 authored and benvinegar committed Jan 20, 2017
1 parent acf0f4e commit 5286373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/TraceKit/tracekit.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var UNKNOWN_FUNCTION = '?';
var ERROR_TYPES_RE = /^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;

function getLocationHref() {
if (typeof document === 'undefined')
if (typeof document === 'undefined' || typeof document.location === 'undefined')
return '';

return document.location.href;
Expand Down

0 comments on commit 5286373

Please sign in to comment.