🐛 Still try loading timetable after initial fetch

If the user triggers a new data fetch
and there is no timetable data available,
the app now tries to request the timetable
again instead of just doing a partial fetch.
This commit is contained in:
2023-06-04 20:05:12 +02:00
parent 2837255552
commit d1910a7877

View File

@ -59,6 +59,10 @@ export const classList = ref({});
const baseUrl = import.meta.env.VITE_API_ENDPOINT || "/api";
export async function fetchData(days, partial) {
if (!timetable.value.data || Object.keys(classList.value).length == 0) {
partial = false;
}
const steps = 2 * days.length + (partial ? 0 : 2);
let step = 1;
loadingFailed.value = false;