fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
623676b
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 2 Jul 2020 15:43:02 +0000
(17:43 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 10 Sep 2020 12:15:11 +0000
(14:15 +0200)
src/catalogue/static/player/player.js
patch
|
blob
|
history
diff --git
a/src/catalogue/static/player/player.js
b/src/catalogue/static/player/player.js
index
d804463
..
d93bbad
100644
(file)
--- a/
src/catalogue/static/player/player.js
+++ b/
src/catalogue/static/player/player.js
@@
-46,7
+46,11
@@
var initialElem = $('.play', $root).first();
var initialTime = 0;
if (Modernizr.localstorage) {
var initialElem = $('.play', $root).first();
var initialTime = 0;
if (Modernizr.localstorage) {
- audiobooks = JSON.parse(localStorage["audiobook-history"]);
+ try {
+ audiobooks = JSON.parse(localStorage["audiobook-history"]);
+ } catch {
+ audiobooks = {};
+ }
last = audiobooks[$root.attr("data-book-id")]
if (last) {
initialElem = $('[data-media-id="' + last[1] + '"] .play', $root).first();
last = audiobooks[$root.attr("data-book-id")]
if (last) {
initialElem = $('[data-media-id="' + last[1] + '"] .play', $root).first();