Skip to content

Commit 5286373

Browse files
rmevans9benvinegar
authored andcommitted
Check document.location before trying to use it
1 parent acf0f4e commit 5286373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vendor/TraceKit/tracekit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var UNKNOWN_FUNCTION = '?';
2424
var ERROR_TYPES_RE = /^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;
2525

2626
function getLocationHref() {
27-
if (typeof document === 'undefined')
27+
if (typeof document === 'undefined' || typeof document.location === 'undefined')
2828
return '';
2929

3030
return document.location.href;

0 commit comments

Comments
 (0)