diff options
| -rw-r--r-- | src/student-prod.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/student-prod.ts b/src/student-prod.ts index 8b737f8..0dcbc71 100644 --- a/src/student-prod.ts +++ b/src/student-prod.ts @@ -61,7 +61,7 @@ async function fetchStudents(idFilter?: number, nameFilter?: string, groupFilter if (students === null) { const studentsPromise = _fetchStudents(); const storedStudents = localStorage.getItem("students"); - if (storedStudents) { + if (storedStudents !== null && storedStudents.length > 0) { studentsPromise.then((fetched) => localStorage.setItem("students", JSON.stringify(fetched))); students = []; for (const o of JSON.parse(storedStudents)) { |
