summaryrefslogtreecommitdiff
path: root/src/journal-remote/browse.html
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-06-27 14:50:19 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-27 14:50:23 +0900
commit944072feddb73333023d0a98bf87fd2a17f894d3 (patch)
tree01e721d872aec5233bdca1ec87b756bd0e953b67 /src/journal-remote/browse.html
parentc497e449f41774a36e01ae2cc2abade6133dffe1 (diff)
downloadsystemd-944072feddb73333023d0a98bf87fd2a17f894d3.tar.gz
journal-gateway: use localStorage["cursor"] only when it has valid value
Discovered by LGTM.
Diffstat (limited to 'src/journal-remote/browse.html')
-rw-r--r--src/journal-remote/browse.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/journal-remote/browse.html b/src/journal-remote/browse.html
index 9f519adbd6..e5162d1088 100644
--- a/src/journal-remote/browse.html
+++ b/src/journal-remote/browse.html
@@ -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";