summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-26 17:15:38 +0300
committerAndrew Dolgov <[email protected]>2017-02-26 17:15:38 +0300
commit233ca75ecd21b4ec965fdcdd653022307107ae93 (patch)
treed019854573cac4a6eee87492a7bc66dcb869003a
parent50e82ec2c306469e3d4237f84f2e0cfb74526d77 (diff)
limit offline index entries to those having an actual book stored
-rw-r--r--js/offline.js8
1 files 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]) {