From 3695cd8975eb8ea5d2c8312c6f5c85d5b8702141 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Mon, 6 May 2024 10:40:15 -0500 Subject: [PATCH] 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. --- src/lib/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/utils.js b/src/lib/utils.js index 8ad4765..a050f2e 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -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';