Skip to content

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

fix: unable to update null policy (#34813)

TheMikeyRoss2da9e9c9652b
diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/index.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/index.tsx
index 7e824bbed8c..232c74dd81a 100644
--- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/index.tsx
+++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/index.tsx
@@ -220,9 +220,9 @@ export const PolicyEditorPanel = memo(function ({
if (selectedPolicy.command === 'INSERT') {
// [Joshen] Cause editorOneRef will be the check statement in this scenario
- if (selectedPolicy.check !== null && selectedPolicy.check !== using) payload.check = using
+ if (selectedPolicy.check !== using) payload.check = using
} else {
- if (selectedPolicy.check !== null && selectedPolicy.check !== check) payload.check = check
+ if (selectedPolicy.check !== check) payload.check = check
}
if (Object.keys(payload).length === 0) return onSelectCancel()