🐛 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:
@ -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;
|
||||
|
Reference in New Issue
Block a user