From 80fabd063f3bf05abafe2d91f37b10778db1b1f1 Mon Sep 17 00:00:00 2001 From: rstular Date: Wed, 5 Feb 2020 11:09:40 +0100 Subject: localForage seems to return -1 instead of null, account for that --- js/gradings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/gradings.js b/js/gradings.js index 1109961..0b8b53b 100644 --- a/js/gradings.js +++ b/js/gradings.js @@ -93,7 +93,7 @@ async function loadGradings(force_refresh = false) { Promise.all(promises_to_run).then(() => { - if (gradings === null || force_refresh) { + if (gradings === null || gradings === [] || gradings === -1 || force_refresh) { $.ajax({ url: API_ENDPOINT, crossDomain: true, -- cgit v1.2.3