fix: Error when deleting last travel entry.

This commit is contained in:
2026-07-13 23:46:28 +02:00
parent 206eb7f9cd
commit f97bc6a7de

View File

@@ -97,6 +97,9 @@ document.addEventListener('DOMContentLoaded', async function () {
}) })
.then(res => res.json()) .then(res => res.json())
.then(data => { .then(data => {
if (!Array.isArray(data)) {
data = [];
}
let totalDistanceHomework = 0; let totalDistanceHomework = 0;
let totalDistanceBusiness = 0; let totalDistanceBusiness = 0;