Skip to content

Commit

Permalink
Update Code.js
Browse files Browse the repository at this point in the history
Fix #424
  • Loading branch information
PierrickVoulet authored Nov 7, 2023
1 parent 097b9c6 commit 12e8085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/automations/vacation-calendar/Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 12e8085

Please sign in to comment.