fix related item bug that appears to be due to inability to iterate over SJOW
This commit is contained in:
parent
1703dfe5cc
commit
ff9b7bb1ce
1 changed files with 3 additions and 1 deletions
|
@ -289,6 +289,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
if(attachment.snapshot === false || !this._saveFiles) {
|
if(attachment.snapshot === false || !this._saveFiles) {
|
||||||
// if snapshot is explicitly set to false, attach as link
|
// if snapshot is explicitly set to false, attach as link
|
||||||
if(attachment.document) {
|
if(attachment.document) {
|
||||||
|
Zotero.debug("mime type is "+attachment.document.contentType);
|
||||||
Zotero.Attachments.linkFromURL(attachment.document.location.href, parentID,
|
Zotero.Attachments.linkFromURL(attachment.document.location.href, parentID,
|
||||||
(attachment.mimeType ? attachment.mimeType : attachment.document.contentType),
|
(attachment.mimeType ? attachment.mimeType : attachment.document.contentType),
|
||||||
(attachment.title ? attachment.title : attachment.document.title));
|
(attachment.title ? attachment.title : attachment.document.title));
|
||||||
|
@ -444,7 +445,8 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
|
|
||||||
// add see alsos
|
// add see alsos
|
||||||
if(item.seeAlso) {
|
if(item.seeAlso) {
|
||||||
for each(var seeAlso in item.seeAlso) {
|
for(var i=0; i<item.seeAlso.length; i++) {
|
||||||
|
var seeAlso = item.seeAlso[i];
|
||||||
if(this._IDMap[seeAlso]) {
|
if(this._IDMap[seeAlso]) {
|
||||||
newItem.addRelatedItem(this._IDMap[seeAlso]);
|
newItem.addRelatedItem(this._IDMap[seeAlso]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue