fix import failure when an attachment has no path or uri
This commit is contained in:
parent
d850b290aa
commit
621af3b301
1 changed files with 1 additions and 1 deletions
|
@ -86,6 +86,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
} else {
|
} else {
|
||||||
if(type == "attachment") { // handle attachments differently
|
if(type == "attachment") { // handle attachments differently
|
||||||
newItem = this._saveAttachment(item);
|
newItem = this._saveAttachment(item);
|
||||||
|
if(!newItem) return;
|
||||||
var myID = newItem.id;
|
var myID = newItem.id;
|
||||||
} else {
|
} else {
|
||||||
var typeID = Zotero.ItemTypes.getID(type);
|
var typeID = Zotero.ItemTypes.getID(type);
|
||||||
|
@ -357,7 +358,6 @@ Zotero.Translate.ItemSaver.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if field is valid for this type, set field
|
// if field is valid for this type, set field
|
||||||
Zotero.debug("Translate: Testing "+fieldID+" "+typeID);
|
|
||||||
if(fieldID && Zotero.ItemFields.isValidForType(fieldID, typeID)) {
|
if(fieldID && Zotero.ItemFields.isValidForType(fieldID, typeID)) {
|
||||||
newItem.setField(fieldID, item[field]);
|
newItem.setField(fieldID, item[field]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue