Skip to content

Commit 5a3c2fe

Browse files
fix: webhook inconsistent render issue (#595)
1 parent b7d2ef1 commit 5a3c2fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/builds/create-edit/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ export default function CreateEditBuilds({
126126
} = methods
127127

128128
useEffect(() => {
129-
if (!buildData) return
129+
if (!buildData || isLoadingCodeRepos) return
130130
reset(buildData)
131131
const modeType = watch('mode.type')
132132
const repoUrl = watch(`mode.${modeType}.repoUrl`)
133133
const codeRepo = codeRepos?.find((codeRepo) => codeRepo.repositoryUrl === repoUrl)
134134
setRepoName(codeRepo?.name || '')
135135
setGitService(codeRepo?.gitService || '')
136-
}, [buildData, setValue])
136+
}, [buildData, isLoadingCodeRepos, setValue])
137137

138138
const mutating = isLoadingCreate || isLoadingUpdate || isLoadingDelete || isLoadingCodeRepos
139139
if (!mutating && (isSuccessUpdate || isSuccessDelete)) return <Redirect to={`/teams/${teamId}/container-images`} />

0 commit comments

Comments
 (0)