Skip to content

Commit 01e8b60

Browse files
committed
Trailing slash fix #1078
1 parent 7970d88 commit 01e8b60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

browser/data-browser/src/routes/RootRoutes.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ const TopRouteComponent: React.FC = () => {
3232
// We need to combine origin with tanstack's href because tanstack does not include the origin in the href but the normal window.location.href is not reactive.
3333
const subject = window.location.origin + href;
3434

35-
return <ResourcePage subject={subject} key={subject} />;
35+
// Remove trailing slash from subject
36+
const cleanedSubject = subject.endsWith('/') ? subject.slice(0, -1) : subject;
37+
38+
return <ResourcePage subject={cleanedSubject} key={cleanedSubject} />;
3639
};
3740

3841
export const topRoute = createRoute({

0 commit comments

Comments
 (0)