🚑 Fix history not loading if no class is selected

This commit is contained in:
2022-08-30 15:31:53 +02:00
parent e1a429162a
commit 7b2a465abd

View File

@ -149,7 +149,7 @@ export async function fetchSubstitutions() {
export async function fetchHistory() {
const requestDate = `?date=${selectedDate.value.getTime()}`;
const historyResponse = await fetch(
classFilter.value == "all"
classFilter.value == "none"
? `${baseUrl}/history${requestDate}`
: `${baseUrl}/history${requestDate}&class=${classFilter.value}`
);