1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-28 09:19:37 +02:00

Add check for missing start dates in calendar event loading

This commit is contained in:
Sean Morley 2024-12-15 13:28:33 -05:00
parent edc5fdf1cc
commit 7d609d01ea

View file

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