From a10872baa4a71f7361e915b7939f467a53d5b139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sun, 6 Feb 2022 21:43:38 +0100 Subject: [PATCH] No need to update the style when no source is set --- src/ol/layer/WebGLTile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/layer/WebGLTile.js b/src/ol/layer/WebGLTile.js index 64c4b1167e..6cf7a9c90c 100644 --- a/src/ol/layer/WebGLTile.js +++ b/src/ol/layer/WebGLTile.js @@ -390,7 +390,9 @@ class WebGLTileLayer extends BaseTileLayer { * @private */ handleSourceUpdate_() { - this.setStyle(this.style_); + if (this.getSource()) { + this.setStyle(this.style_); + } } /**