mirror of
https://gitee.com/dify_ai/dify.git
synced 2025-12-06 11:29:30 +08:00
fix: modify usePluginTaskList initialization and dependencies in use-plugins.ts (#29130)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user