Skip to content

Commit

Permalink
Add Zotero.Item.prototype.parentItem getter
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Mar 29, 2018
1 parent 38330e4 commit 46eb84e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/content/zotero/xpcom/data/item.js
Expand Up @@ -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', {
Expand Down

0 comments on commit 46eb84e

Please sign in to comment.