Skip to content

Commit

Permalink
Prevent token repeating in url
Browse files Browse the repository at this point in the history
Fix for Esri#1090
  • Loading branch information
octavm authored Apr 24, 2018
1 parent a95ec95 commit 04b051b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Layers/BasemapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 04b051b

Please sign in to comment.