From 5013ffa814d6280baa17404415a0cf451af6e401 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Mon, 16 Jan 2017 02:10:21 +0100 Subject: [PATCH] [TASK] Improve labelupdate after mode change --- lib/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/map.js b/lib/map.js index b5cbce7..7ece165 100644 --- a/lib/map.js +++ b/lib/map.js @@ -339,7 +339,7 @@ define(["map/clientlayer", "map/labelslayer", document.querySelector("head").innerHTML += ""; document.querySelector("html").classList.add(e.layer.options.mode); var cssInterval = setInterval(function () { - if (document.querySelector(".css-mode").sheet) { + if (typeof document.querySelector(".css-mode").sheet.cssRules != 'undefined') { labelsLayer.updateColor(); clearInterval(cssInterval); }