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:
parent
dd5132e105
commit
a334e1f462
|
@ -132,7 +132,7 @@ Zotero.Translate.Sandbox = {
|
||||||
var nAttachments = attachments.length;
|
var nAttachments = attachments.length;
|
||||||
for(var j=0; j<nAttachments; j++) {
|
for(var j=0; j<nAttachments; j++) {
|
||||||
if(attachments[j].document) {
|
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";
|
attachments[j].mimeType = "text/html";
|
||||||
delete attachments[j].document;
|
delete attachments[j].document;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user