diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index 74b2b931a8..5fe955c502 100644 --- 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';