[BUGFIX] Start and end mode

This commit is contained in:
Xaver Maierhofer 2017-01-07 03:09:14 +01:00
parent 89b9a4216e
commit f3eb100da8
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8

View File

@ -275,7 +275,7 @@ define(["map/clientlayer", "map/labelslayer",
map = L.map(el, options); map = L.map(el, options);
var now = new Date(); var now = new Date();
config.mapLayers.forEach(function (item, i) { 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; item.config.order = item.config.start * -1;
} else { } else {
item.config.order = i; item.config.order = i;