fix share url can be broken because of extra slash (#7779)

This commit is contained in:
Elian Doran
2025-11-18 16:04:23 +02:00
committed by GitHub

View File

@@ -24,7 +24,7 @@ export default function SharedInfo() {
const shareId = getShareId(note); const shareId = getShareId(note);
if (syncServerHost) { if (syncServerHost) {
link = `${syncServerHost}/share/${shareId}`; link = new URL(`/share/${shareId}`, syncServerHost).href;
} else { } else {
let host = location.host; let host = location.host;
if (host.endsWith("/")) { if (host.endsWith("/")) {