mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
fix(studio): delete all branches disabling branching
This commit is contained in:
1 parent
03bbea8ff2
commit
39c2d88375
1 file changed
+7
-1
@@ -130,7 +130,13 @@ const BranchManagement = () => {
|
||||
const onConfirmDisableBranching = () => {
|
||||
if (projectRef == undefined) return console.error('Project ref is required')
|
||||
if (!previewBranches) return console.error('No branches available')
|
||||
disableBranching({ projectRef, branchIds: previewBranches?.map((branch) => branch.id) })
|
||||
disableBranching({
|
||||
projectRef,
|
||||
branchIds: previewBranches
|
||||
// we can't delete the default branch it'll result in a permission error
|
||||
?.filter((branch) => branch.is_default === false)
|
||||
.map((branch) => branch.id),
|
||||
})
|
||||
}
|
||||
|
||||
if (!hasBranchEnabled) return <BranchingEmptyState />
|
||||
|
||||
Reference in new issue
Block a user