We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434017f commit 9a4a966Copy full SHA for 9a4a966
src/lib/topojson_utils.js
@@ -13,11 +13,9 @@ topojsonUtils.getTopojsonName = function(geoLayout) {
13
};
14
15
topojsonUtils.getTopojsonPath = function(topojsonURL, topojsonName) {
16
- if (topojsonURL.endsWith('/')) {
17
- return topojsonURL + topojsonName + '.json';
18
- } else {
19
- return topojsonURL + '/' + topojsonName + '.json';
20
- }
+ topojsonURL += topojsonURL.endsWith('/') ? '' : '/';
+
+ return `${topojsonURL}${topojsonName}.json`;
21
22
23
topojsonUtils.getTopojsonFeatures = function(trace, topojson) {
0 commit comments