journal-gateway: use localStorage["cursor"] only when it has valid value

Discovered by LGTM.
This commit is contained in:
Yu Watanabe 2018-06-27 14:50:19 +09:00
parent c497e449f4
commit 944072fedd

View file

@ -236,10 +236,12 @@
function entriesLoad(range) {
if (range == null)
range = localStorage["cursor"] + ":0";
if (range == null)
range = "";
if (range == null) {
if (localStorage["cursor"] != null && localStorage["cursor"] != "")
range = localStorage["cursor"] + ":0";
else
range = "";
}
var url = "/entries";