fix: Error loading calender when transport has no date
This commit is contained in:
@@ -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})` : '')
|
||||||
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user