fix(task): make sure task comment url only contains one slash

This commit is contained in:
kolaente 2025-05-14 21:48:04 +02:00
parent aa98b9ba0d
commit 5276b0f1fa
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 1 deletions

View File

@ -420,7 +420,8 @@ async function deleteComment(commentToDelete: ITaskComment) {
}
function getCommentUrl(commentId: string) {
return `${frontendUrl.value}${location.pathname}${location.search}#comment-${commentId}`
const baseUrl = frontendUrl.value.endsWith('/') ? frontendUrl.value.slice(0, -1) : frontendUrl.value
return `${baseUrl}${location.pathname}${location.search}#comment-${commentId}`
}
</script>