From 233ca75ecd21b4ec965fdcdd653022307107ae93 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 26 Feb 2017 17:15:38 +0300 Subject: limit offline index entries to those having an actual book stored --- js/offline.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/offline.js b/js/offline.js index a8e914a..90a3132 100644 --- a/js/offline.js +++ b/js/offline.js @@ -13,12 +13,12 @@ function populate_list() { Promise.all([ localforage.getItem(key), localforage.getItem(key + ".cover"), - localforage.getItem(key + ".lastread") + localforage.getItem(key + ".lastread"), + localforage.getItem(key + ".book") ]).then(function(results) { - var info = results[0]; - if (info) { - + if (results[0] && results[3]) { + var info = results[0]; var cover = false; if (results && results[1]) { -- cgit v1.2.3