mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-25 01:38:35 +02:00
Update -link-form.tsx
This commit is contained in:
@@ -50,14 +50,15 @@ export const getMetadata = createServerFn("GET", async (url: string) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = urlSchema.safeParse(url)
|
const result = urlSchema.safeParse(decodeURIComponent(url))
|
||||||
|
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
result.error.issues.map((issue) => issue.message).join(", "),
|
result.error.issues.map((issue) => issue.message).join(", "),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
url = ensureUrlProtocol(url)
|
url = ensureUrlProtocol(decodeURIComponent(url))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
|
|||||||
Reference in New Issue
Block a user