Skip to content

Commit 05e752c

Browse files
committed
fix: Remove trailing / from stac baseUrl [fix #15]
1 parent b763302 commit 05e752c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stac-api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class StacApi {
1212
baseUrl: string;
1313

1414
constructor(baseUrl: string) {
15-
this.baseUrl = baseUrl;
15+
this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;
1616
}
1717

1818
fixBboxCoordinateOrder(bbox?: Bbox): Bbox | undefined {

0 commit comments

Comments
 (0)