Skip to content

Commit 31a0f8f

Browse files
authored
fix: no trailing slash if not set (#119)
1 parent fa34c05 commit 31a0f8f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

report/src/services/dataService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class DataService {
1111
private baseUrl: string;
1212

1313
constructor(baseUrl: string) {
14-
this.baseUrl = baseUrl.replace(/\/$/, "") + "/"; // Ensure trailing slash
14+
this.baseUrl = baseUrl;
1515
}
1616

1717
async getMetadata(): Promise<BenchmarkRuns> {
@@ -73,7 +73,7 @@ export function getDataSourceConfig(): DataServiceConfig {
7373

7474
if (dataSource === "api" && apiBaseUrl) {
7575
// API mode: use the configured API base URL (ensure trailing slash)
76-
return { baseUrl: apiBaseUrl };
76+
return { baseUrl: apiBaseUrl.replace(/\/$/, "") + "/" };
7777
} else {
7878
// Static mode: use current origin (empty string means relative to current domain)
7979
return { baseUrl: "" };

0 commit comments

Comments
 (0)