Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/raven.js
Original file line number Diff line number Diff line change
Expand Up @@ -1629,10 +1629,12 @@ Raven.prototype = {
};
}

if (_window.location && _window.location.href) {
httpData.url = _window.location.href;
} else if (_document.location && _document.location.href) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need a check for this._hasDocument here before accessing location

httpData.url = _document.location.href;
}
if (this._hasDocument) {
if (_document.location && _document.location.href) {
httpData.url = _document.location.href;
}
if (_document.referrer) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be merged into one if (this._hasDocument && _document.referrer)

if (!httpData.headers) httpData.headers = {};
httpData.headers.Referer = _document.referrer;
Expand Down