Add Zotero.Item.prototype.parentItem getter

This commit is contained in:
Dan Stillman 2018-03-29 07:11:15 -04:00
parent 38330e4c13
commit 46eb84e859

View file

@ -145,6 +145,9 @@ Zotero.defineProperty(Zotero.Item.prototype, 'parentItemKey', {
get: function() { return this.parentKey; },
set: function(val) { return this.parentKey = val; }
});
Zotero.defineProperty(Zotero.Item.prototype, 'parentItem', {
get: function() { return Zotero.Items.get(this.parentID) || undefined; },
});
Zotero.defineProperty(Zotero.Item.prototype, 'firstCreator', {