diff options
author | rstular <rok@stular.eu> | 2020-05-17 20:25:10 +0200 |
---|---|---|
committer | rstular <rok@stular.eu> | 2020-05-17 21:02:04 +0200 |
commit | 730722259f6f079c930f6fcce1c2f1e715d3df63 (patch) | |
tree | 909908e9f3ca8b1ab472f1d4cbf01801e43ce9ad /dist/js/teachers.js | |
parent | Language changing bug fix (diff) | |
download | beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.gz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.bz2 beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.lz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.xz beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.tar.zst beziapp-730722259f6f079c930f6fcce1c2f1e715d3df63.zip |
Diffstat (limited to 'dist/js/teachers.js')
-rw-r--r-- | dist/js/teachers.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dist/js/teachers.js b/dist/js/teachers.js index da69e96..da0a62d 100644 --- a/dist/js/teachers.js +++ b/dist/js/teachers.js @@ -35,8 +35,8 @@ async function loadTeachers(force_refresh = false) { await gsecInstance.login(username, password); gsecInstance.fetchTeachers().then( (value) => { teachers = value; - localforage.setItem("teachers", value).then(() => { - displayData(); + localforage.setItem("teachers", value).then((saved_teachers) => { + displayData(saved_teachers); setLoading(false); }); setLoading(false); @@ -49,13 +49,13 @@ async function loadTeachers(force_refresh = false) { setLoading(false); } } else { - displayData(); + displayData(teachers); setLoading(false); } } // Function for displaying data -function displayData() { +function displayData(teachers) { for(const teacher of Object.keys(teachers)) { // Create row let row = document.createElement("tr"); |