mirror of
https://github.com/zadam/trilium.git
synced 2025-12-17 05:39:55 +01:00
fix share url can be broken because of extra slash
This commit is contained in:
@@ -24,7 +24,8 @@ export default function SharedInfo() {
|
|||||||
const shareId = getShareId(note);
|
const shareId = getShareId(note);
|
||||||
|
|
||||||
if (syncServerHost) {
|
if (syncServerHost) {
|
||||||
link = `${syncServerHost}/share/${shareId}`;
|
const cleanedServerHost = syncServerHost.replace(/\/$/, "");
|
||||||
|
link = `${cleanedServerHost}/share/${shareId}`;
|
||||||
} else {
|
} else {
|
||||||
let host = location.host;
|
let host = location.host;
|
||||||
if (host.endsWith("/")) {
|
if (host.endsWith("/")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user