www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit cc726ef333ed4a4129d96371dee4e39154b0c1d1
parent 7c3e054ebc5306c03c0fe740c8abdc9d24bfa7ea
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 12 Sep 2006 05:20:43 +0000

Not that it should happen, but survive an item with an item type of 0 or undefined (and more importantly, let you delete or change it)


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -3331,6 +3331,12 @@ Scholar.ItemFields = new function(){ return _itemTypeFields[itemTypeID]; } + if (!itemTypeID){ + Scholar.debug("Invalid item type id '" + itemTypeID + + "' provided to getItemTypeFields()", 1); + return []; + } + var sql = 'SELECT fieldID FROM itemTypeFields ' + 'WHERE itemTypeID=' + itemTypeID + ' ORDER BY orderIndex';