mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-06 21:55:18 +02:00
fix: Error loading calender when transport has no date
This commit is contained in:
parent
12a6429812
commit
69967b759f
1 changed files with 8 additions and 6 deletions
|
@ -90,12 +90,14 @@
|
||||||
|
|
||||||
if (transportations) {
|
if (transportations) {
|
||||||
dates = dates.concat(
|
dates = dates.concat(
|
||||||
transportations.map((transportation) => ({
|
transportations
|
||||||
id: transportation.id,
|
.filter((i) => i.date)
|
||||||
start: transportation.date || '', // Ensure it's a string
|
.map((transportation) => ({
|
||||||
end: transportation.end_date || transportation.date || '', // Ensure it's a string
|
id: transportation.id,
|
||||||
title: transportation.name + (transportation.type ? ` (${transportation.type})` : '')
|
start: transportation.date || '', // Ensure it's a string
|
||||||
}))
|
end: transportation.end_date || transportation.date || '', // Ensure it's a string
|
||||||
|
title: transportation.name + (transportation.type ? ` (${transportation.type})` : '')
|
||||||
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue