mirror of
https://github.com/harness/drone.git
synced 2025-05-05 15:32:56 +00:00
* Revert "fix: [CODE-3521] loading state and infinite loop when a repo name is changed (#3690)" This reverts commit 065db116d1feaa024572753f09ff86975e8bde71.
This commit is contained in:
parent
799a8b0de8
commit
0db23cc023
@ -59,8 +59,11 @@ export function useGetRepositoryMetadata() {
|
||||
if (repoName && (!repoMetadata || cacheStrategy.isExpired())) {
|
||||
refetch()
|
||||
} else if (repoMetadata && repoMetadata.path !== repoPath) {
|
||||
history.replace(routes.toCODERepository({ repoPath: repoMetadata.path as string }))
|
||||
setTimeout(() => refetch(), 0)
|
||||
refetch().then(() => {
|
||||
if (repoPath?.toLocaleLowerCase() === repoMetadata.path?.toLocaleLowerCase()) {
|
||||
history.replace(routes.toCODERepository({ repoPath: repoMetadata.path as string }))
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [repoName, refetch, repoMetadata, repoPath])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user