CookieSandbox: Fix error setting request cookies
Regression from 6af3b0276a
, showing up as "trackedBy is undefined" error
https://forums.zotero.org/discussion/98322/no-snapshot-or-pdf-autosaved-using-zotero-connector-on-safari
This commit is contained in:
parent
74f00e60c7
commit
5620dc96bd
1 changed files with 2 additions and 2 deletions
|
@ -384,10 +384,10 @@ Zotero.CookieSandbox.Observer = new function() {
|
|||
var cookiesForURI = trackedBy.getCookiesForURI(channel.URI);
|
||||
}
|
||||
|
||||
if(trackedBy.userAgent) {
|
||||
if (trackedBy && trackedBy.userAgent) {
|
||||
channel.setRequestHeader("User-Agent", trackedBy.userAgent, false);
|
||||
}
|
||||
|
||||
|
||||
if(!trackedBy || !cookiesForURI) {
|
||||
channel.setRequestHeader("Cookie", "", false);
|
||||
channel.setRequestHeader("Cookie2", "", false);
|
||||
|
|
Loading…
Reference in a new issue