fix for grouping items with no type
Fixed an error that caused the app to crash when trying to group a bulk set of items when there are items with no "type" property. Items something like "delete request" items had no type.
This commit is contained in:
@@ -84,6 +84,10 @@ const getPluralType = (type) =>{
|
||||
// is not generated in the lookup. this is a
|
||||
// kludge around that. (specifically availabilitySummary)
|
||||
plural = teamsnap.getPluralType(type) || (function() {
|
||||
if (type === undefined){
|
||||
return type
|
||||
}
|
||||
|
||||
switch (type.slice(-1)) {
|
||||
case 'y':
|
||||
return type.slice(0, -1) + 'ies';
|
||||
|
||||
Reference in New Issue
Block a user