Merge pull request #944 from judicaelandria/fix/url

fix: use location origin
This commit is contained in:
David Sheldrick 2022-09-01 11:45:42 +01:00 committed by GitHub
commit 8351936321
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ const ShareMenu = () => {
},
}
const crushed = JSONCrush.crush(JSON.stringify(state))
const link = `${window.location.href}/?d=${encodeURIComponent(crushed)}`
const link = `${window.location.origin}/?d=${encodeURIComponent(crushed)}`
navigator.clipboard.writeText(link)
} catch (err) {
console.error(err)