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)
This commit is contained in:
parent
7c3e054ebc
commit
cc726ef333
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user