fixes #1062, Zotero RDF import/export problems with empty collections

not sure if 3B is fixed (feel free to re-open if it isn't), but 1, 2, and 3A should now be resolved
This commit is contained in:
Simon Kornblith 2008-07-11 09:18:03 +00:00
parent 7c48ca8e15
commit e89de4b417

View File

@ -1764,6 +1764,9 @@ Zotero.Translate.prototype._export = function() {
} else if(this.collection) {
// get items in this collection
this._itemsLeft = this.collection.getChildItems();
if(!this._itemsLeft) {
this._itemsLeft = [];
}
if(this.configOptions.getCollections) {
// get child collections
@ -1776,7 +1779,10 @@ Zotero.Translate.prototype._export = function() {
// get items in child collections
for each(var collection in this._collectionsLeft) {
this._itemsLeft = this._itemsLeft.concat(collection.getChildItems());
var childItems = collection.getChildItems();
if(childItems) {
this._itemsLeft = this._itemsLeft.concat(childItems);
}
}
}
} else {