Use documentURI/URL instead of location.href.

document.location is null after the document is detached from its parent window (e.g. after we navigate to a different page in the same hidden browser)
This commit is contained in:
aurimasv 2014-01-07 22:02:15 -06:00
parent dd5132e105
commit a334e1f462

View File

@ -132,7 +132,7 @@ Zotero.Translate.Sandbox = {
var nAttachments = attachments.length;
for(var j=0; j<nAttachments; j++) {
if(attachments[j].document) {
attachments[j].url = attachments[j].document.location.href;
attachments[j].url = attachments[j].document.documentURI || attachments[j].document.URL;
attachments[j].mimeType = "text/html";
delete attachments[j].document;
}