diff --git a/utils/calendar.js b/utils/calendar.js index 5617747..28e270e 100644 --- a/utils/calendar.js +++ b/utils/calendar.js @@ -273,7 +273,7 @@ cal.getTotalByCourse = function(user, callback) { for (let event of calendar.events) { // Guess name of event, last element of split('-'); - let split = event.name.split('-'); + let split = event.name.split(' -').map(x => x.trim()); let name = split[split.length - 1]; if (res[name] === undefined) {