From 12e8085523f7d73acfed0a965c597b98018da200 Mon Sep 17 00:00:00 2001 From: Pierrick Voulet <6769971+PierrickVoulet@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:55:11 -0500 Subject: [PATCH] Update Code.js Fix #424 --- solutions/automations/vacation-calendar/Code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/automations/vacation-calendar/Code.js b/solutions/automations/vacation-calendar/Code.js index d00a2bee6..cb65d5b4d 100644 --- a/solutions/automations/vacation-calendar/Code.js +++ b/solutions/automations/vacation-calendar/Code.js @@ -162,7 +162,7 @@ function shouldImportEvent(user, keyword, event) { // Filters out events where the keyword did not appear in the summary // (that is, the keyword appeared in a different field, and are thus // is not likely to be relevant). - if (event.summary.toLowerCase().indexOf(keyword) < 0) { + if (!event.summary || event.summary.toLowerCase().indexOf(keyword) < 0) { return false; } if (!event.organizer || event.organizer.email == user.getEmail()) {