Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx

Joshen Limd9fd3461b7c5
diff --git a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
index 84daf7c27cd..60f651d3c52 100644
--- a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
+++ b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
@@ -21,7 +21,7 @@ const EdgeFunctionsListItem: FC<Props> = ({ function: item }) => {
const { project } = useProjectContext()
// get the .co or .net TLD from the restUrl
const restUrl = project?.restUrl
- const restUrlTld = new URL(restUrl ?? 'http://example.com').hostname.split('.').pop()
+ const restUrlTld = restUrl !== undefined ? new URL(restUrl as string).hostname.split('.').pop() : 'co'
const functionUrl = `https://${ref}.supabase.${restUrlTld}/functions/v1/${item.slug}`
return (