From f3eb100da8b7487cef944bbe561a282cfdb6fd02 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Sat, 7 Jan 2017 03:09:14 +0100 Subject: [PATCH] [BUGFIX] Start and end mode --- lib/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/map.js b/lib/map.js index 5be38ec..b5cbce7 100644 --- a/lib/map.js +++ b/lib/map.js @@ -275,7 +275,7 @@ define(["map/clientlayer", "map/labelslayer", map = L.map(el, options); var now = new Date(); config.mapLayers.forEach(function (item, i) { - if (item.config.start <= now.getHours() || item.config.end > now.getHours()) { + if ((typeof item.config.start === 'number' && item.config.start <= now.getHours()) || (typeof item.config.end === 'number' && item.config.end > now.getHours())) { item.config.order = item.config.start * -1; } else { item.config.order = i;