1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-02 19:55:18 +02:00

Add check for missing start dates in calendar event loading

This commit is contained in:
Sean Morley 2024-12-15 13:29:08 -05:00 committed by GitHub
commit 4de6fa675f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,12 +21,14 @@ export const load = (async (event) => {
}> = [];
adventures.forEach((adventure) => {
adventure.visits.forEach((visit) => {
dates.push({
id: adventure.id,
start: visit.start_date,
end: visit.end_date || visit.start_date,
title: adventure.name + (adventure.category?.icon ? ' ' + adventure.category.icon : '')
});
if (visit.start_date) {
dates.push({
id: adventure.id,
start: visit.start_date,
end: visit.end_date || visit.start_date,
title: adventure.name + (adventure.category?.icon ? ' ' + adventure.category.icon : '')
});
}
});
});