From ce210b69dfbe32719fd5cc8992e57179c96be0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Wed, 1 Jul 2015 00:41:29 +0300 Subject: [PATCH] fixing JS error --- static/js/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index 0c4d4105..0b897837 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -16,7 +16,8 @@ $(function () { $("#timer").data("timer", data.timer); } - if (data.last_ping_human.indexOf("seconds ago") > 0) + var lph = data.last_ping_human; + if (lph && lph.indexOf("seconds ago") > 0) data.last_ping_human = "seconds ago"; if (data.last_ping_human != lastPingHuman) {