Handle slugs with and without leading /

This commit is contained in:
Ian Philips 2022-10-11 17:22:58 -06:00
parent 4215821f35
commit fb8bd1acfb

View File

@ -1220,10 +1220,9 @@ function getSourceUrl(notification: Notification) {
sourceType sourceType
)}` )}`
else if (sourceSlug) else if (sourceSlug)
return `${sourceSlug}#${getSourceIdForLinkComponent( return `${
sourceId ?? '', sourceSlug.startsWith('/') ? sourceSlug : '/' + sourceSlug
sourceType }#${getSourceIdForLinkComponent(sourceId ?? '', sourceType)}`
)}`
} }
function getSourceIdForLinkComponent( function getSourceIdForLinkComponent(