1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 22:38:11 +09:00

fix: copy link from route object

resolves #289
This commit is contained in:
Daniel Roe 2022-12-02 09:59:09 +00:00
parent 9e9f2bde09
commit 8fc6148a3b
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55

View File

@ -37,7 +37,7 @@ const toggleTranslation = async () => {
} }
const copyLink = async (status: Status) => { const copyLink = async (status: Status) => {
const url = getStatusPermalinkRoute(status) const url = getStatusPermalinkRoute(status)?.href
if (url) if (url)
await clipboard.copy(`${location.origin}${url}`) await clipboard.copy(`${location.origin}${url}`)
} }