From 722498c1f5fbbb1a42ae12cd4a345f1663bd5837 Mon Sep 17 00:00:00 2001 From: octavm Date: Tue, 24 Apr 2018 21:23:06 +0200 Subject: [PATCH] Prevent token repeating in url Fix for #1090 --- src/Layers/BasemapLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Layers/BasemapLayer.js b/src/Layers/BasemapLayer.js index 96eee9542..1f4fb399f 100644 --- a/src/Layers/BasemapLayer.js +++ b/src/Layers/BasemapLayer.js @@ -204,7 +204,7 @@ export var BasemapLayer = TileLayer.extend({ Util.setOptions(this, tileOptions); - if (this.options.token && !config.urlTemplate.includes('token=')) { + if (this.options.token && config.urlTemplate.indexOf('token=') === -1) { config.urlTemplate += ('?token=' + this.options.token); }