[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
1 changed files with 1 additions and 1 deletions

View File

@ -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;