From 9f535e0e91e7707719cbe64ebf03dd147dfe6f85 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Fri, 14 Nov 2014 03:02:27 -0600 Subject: [PATCH] Use Zotero.extendClass for inheritance --- chrome/content/zotero/xpcom/data/item.js | 4 +--- chrome/content/zotero/xpcom/search.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index f3c57bbe0..2a1e2fdc5 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -89,9 +89,7 @@ Zotero.Item = function(itemTypeOrID) { } } -Zotero.Item._super = Zotero.DataObject; -Zotero.Item.prototype = Object.create(Zotero.Item._super.prototype); -Zotero.Item.constructor = Zotero.Item; +Zotero.extendClass(Zotero.DataObject, Zotero.Item); Zotero.Item.prototype._objectType = 'item'; Zotero.Item.prototype._dataTypes = Zotero.Item._super.prototype._dataTypes.concat([ diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index c964e8c6c..1184f7ef0 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -37,9 +37,7 @@ Zotero.Search = function() { this._hasPrimaryConditions = false; } -Zotero.Search._super = Zotero.DataObject; -Zotero.Search.prototype = Object.create(Zotero.Search._super.prototype); -Zotero.Search.constructor = Zotero.Search; +Zotero.extendClass(Zotero.DataObject, Zotero.Search); Zotero.Search.prototype._objectType = 'search'; Zotero.Search.prototype._dataTypes = Zotero.Search._super.prototype._dataTypes.concat([