Skip to content

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

Fix the functions page not been able to reload.

Ivan Vasilov521b8b63a013
diff --git a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
index e968c6e115e..84daf7c27cd 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 as string).hostname.split('.').pop()
+ const restUrlTld = new URL(restUrl ?? 'http://example.com').hostname.split('.').pop()
const functionUrl = `https://${ref}.supabase.${restUrlTld}/functions/v1/${item.slug}`
return (
diff --git a/studio/pages/project/[ref]/functions/index.tsx b/studio/pages/project/[ref]/functions/index.tsx
index 0673931084f..b19b56009a5 100644
--- a/studio/pages/project/[ref]/functions/index.tsx
+++ b/studio/pages/project/[ref]/functions/index.tsx
@@ -44,7 +44,7 @@ const PageLayout: NextPageWithLayout = () => {
body={
<>
{functions.length > 0 &&
- functions.map((item: any) => <EdgeFunctionsListItem key={item.id} function={item} />)}
+ functions.map((item) => <EdgeFunctionsListItem key={item.id} function={item} />)}
</>
}
/>