1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-30 06:43:03 +00:00

Merge remote-tracking branch 'adv/bookmarks'

This commit is contained in:
OzzieIsaacs
2017-09-17 20:26:58 +02:00
2 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
var reader = ePubReader(calibre.bookUrl, {
restore: true,
bookmarks: [calibre.bookmark]
bookmarks: calibre.bookmark ? [calibre.bookmark] : []
});
reader.on("reader:bookmarked", updateBookmark.bind(reader, "add"));
reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove"));
@@ -21,7 +21,7 @@
// Remove other bookmarks (there can only be one)
if (action === "add") {
this.settings.bookmarks.filter(function (bookmark) {
return bookmark !== location;
return bookmark && bookmark !== location;
}).map(function (bookmark) {
this.removeBookmark(bookmark);
}.bind(this));