Skip to content

Commit 2da9e9c

Browse files
fix: unable to update null policy (supabase#34813)
Co-authored-by: Ali Waseem <[email protected]>
1 parent df63ce3 commit 2da9e9c

File tree

1 file changed

+2
-2
lines changed
  • apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel

1 file changed

+2
-2
lines changed

apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ export const PolicyEditorPanel = memo(function ({
220220

221221
if (selectedPolicy.command === 'INSERT') {
222222
// [Joshen] Cause editorOneRef will be the check statement in this scenario
223-
if (selectedPolicy.check !== null && selectedPolicy.check !== using) payload.check = using
223+
if (selectedPolicy.check !== using) payload.check = using
224224
} else {
225-
if (selectedPolicy.check !== null && selectedPolicy.check !== check) payload.check = check
225+
if (selectedPolicy.check !== check) payload.check = check
226226
}
227227

228228
if (Object.keys(payload).length === 0) return onSelectCancel()

0 commit comments

Comments
 (0)