Skip to content

Commit 69f104e

Browse files
committed
make sure slash is added when concatenating topojson path
1 parent bce8d21 commit 69f104e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/topojson_utils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ topojsonUtils.getTopojsonName = function(geoLayout) {
1313
};
1414

1515
topojsonUtils.getTopojsonPath = function(topojsonURL, topojsonName) {
16-
return topojsonURL + topojsonName + '.json';
16+
if (topojsonURL.endsWith('/')) {
17+
return topojsonURL + topojsonName + '.json';
18+
} else {
19+
return topojsonURL + '/' + topojsonName + '.json';
20+
}
1721
};
1822

1923
topojsonUtils.getTopojsonFeatures = function(trace, topojson) {

0 commit comments

Comments
 (0)