mirror of https://github.com/langgenius/dify.git
fix: modify usePluginTaskList initialization and dependencies in use-plugins.ts (#29130)
This commit is contained in:
parent
e8c47ec8ac
commit
2219b93d6b
|
|
@ -612,12 +612,11 @@ export const usePluginTaskList = (category?: PluginCategoryEnum | string) => {
|
|||
const taskAllFailed = lastData?.tasks.every(task => task.status === TaskStatus.failed)
|
||||
if (taskDone && lastData?.tasks.length && !taskAllFailed)
|
||||
refreshPluginList(category ? { category } as any : undefined, !category)
|
||||
}, [initialized, isRefetching, data, category, refreshPluginList])
|
||||
}, [isRefetching])
|
||||
|
||||
useEffect(() => {
|
||||
if (isFetched && !initialized)
|
||||
setInitialized(true)
|
||||
}, [isFetched, initialized])
|
||||
setInitialized(true)
|
||||
}, [])
|
||||
|
||||
const handleRefetch = useCallback(() => {
|
||||
refetch()
|
||||
|
|
|
|||
Loading…
Reference in New Issue