Skip to content

Commit 5b387a0

Browse files
committed
fix share url can be broken because of extra slash
1 parent 0a36d75 commit 5b387a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/client/src/widgets/shared_info.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export default function SharedInfo() {
2424
const shareId = getShareId(note);
2525

2626
if (syncServerHost) {
27-
link = `${syncServerHost}/share/${shareId}`;
27+
const cleanedServerHost = syncServerHost.replace(/\/$/, "");
28+
link = `${cleanedServerHost}/share/${shareId}`;
2829
} else {
2930
let host = location.host;
3031
if (host.endsWith("/")) {

0 commit comments

Comments
 (0)