From 04b051b0e1363f932e80cdfaf4759a04b7ba3eb7 Mon Sep 17 00:00:00 2001 From: octavm Date: Tue, 24 Apr 2018 14:45:57 +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 76be926de..96eee9542 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) { + if (this.options.token && !config.urlTemplate.includes('token=')) { config.urlTemplate += ('?token=' + this.options.token); }