aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-08-28 00:50:22 +0200
committerJonas Smedegaard <dr@jones.dk>2024-08-28 00:50:22 +0200
commit3505e0d8e96fb57a90989b168f09850a4e0efa46 (patch)
tree882d32fa1f26d0d1abd870916412786dd9e2b759
parentc0114a0d004cf0c258f4767cbb0dbc4824b24c51 (diff)
pass only non-empty arrays to template
-rwxr-xr-xbin/events2md.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/events2md.pl b/bin/events2md.pl
index 4272291..12fe7a3 100755
--- a/bin/events2md.pl
+++ b/bin/events2md.pl
@@ -247,11 +247,11 @@ sub resolve_event
time_brief => $time_brief,
summary => $summary,
description => $description,
- attendees => [@attendees],
+ attendees => @attendees ? [@attendees] : undef,
location => $location,
timespan => $timespan,
price => $price,
- attachments => [@attachments],
+ attachments => @attachments ? [@attachments] : undef,
};
}