Skip to content

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

chore: tidy up

phamhieu26de2769e75f
diff --git a/studio/components/interfaces/Database/Functions/CreateFunction.tsx b/studio/components/interfaces/Database/Functions/CreateFunction.tsx
index c2594759f44..88f78d422e6 100644
--- a/studio/components/interfaces/Database/Functions/CreateFunction.tsx
+++ b/studio/components/interfaces/Database/Functions/CreateFunction.tsx
@@ -1,5 +1,5 @@
import { FC, useEffect, useContext, createContext, FormEvent } from 'react'
-import { isEmpty, mapValues, has, filter, keyBy } from 'lodash'
+import { isEmpty, mapValues, has, filter, keyBy, isUndefined } from 'lodash'
import { observer, useLocalObservable } from 'mobx-react-lite'
import {
Button,
@@ -217,7 +217,7 @@ class CreateFunctionStore implements ICreateFunctionStore {
break
}
default: {
- if (has(this.formState, key) && idx != undefined) {
+ if (has(this.formState, key) && !isUndefined(idx)) {
// @ts-ignore
this.formState[key].value[idx] = value
} else {