Fix a javascript null-deref

This commit should fix the following javascript crash that
may occur if the localstorage isn't available/supported by the browser:

```
more.view:140 Uncaught TypeError: Cannot read property 'playCountValue' of null
    at loadShuffleForm (more.view:140)
    at HTMLDocument.<anonymous> (more.view:181)
    at n (jquery-1.7.1.min.js:2)
    at Object.fireWith (jquery-1.7.1.min.js:2)
    at Function.ready (jquery-1.7.1.min.js:2)
    at HTMLDocument.B (jquery-1.7.1.min.js:2)
```

Signed-off-by: jvoisin <julien.voisin@dustri.org>
This commit is contained in:
jvoisin
2019-03-22 06:10:20 +01:00
parent 143a220719
commit 45ef973627
@@ -60,6 +60,7 @@
try {
var data = JSON.parse(localStorage.getItem("randomPlayQueue"));
} catch(e) { return; }
if (data == null ) { return; }
elements = form.getElementsByTagName("input");
for (var i = 0; i < elements.length; i++) {
if (elements[i].type == "hidden") continue;