mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
chore: remove useless void
This commit is contained in:
@ -72,19 +72,19 @@ const WorkflowViewContent = ({
|
|||||||
|
|
||||||
const handleViewTypeChange = useCallback((type: ViewType) => {
|
const handleViewTypeChange = useCallback((type: ViewType) => {
|
||||||
if (viewType === ViewType.graph && type !== viewType)
|
if (viewType === ViewType.graph && type !== viewType)
|
||||||
pendingSyncRef.current = syncWorkflowDraftImmediately(true).catch(() => {})
|
pendingSyncRef.current = syncWorkflowDraftImmediately(true).catch(() => { })
|
||||||
|
|
||||||
doSetViewType(type)
|
doSetViewType(type)
|
||||||
if (type === ViewType.graph) {
|
if (type === ViewType.graph) {
|
||||||
const pending = pendingSyncRef.current
|
const pending = pendingSyncRef.current
|
||||||
if (pending) {
|
if (pending) {
|
||||||
pending.finally(() => {
|
pending.finally(() => {
|
||||||
void refreshGraph()
|
refreshGraph()
|
||||||
})
|
})
|
||||||
pendingSyncRef.current = null
|
pendingSyncRef.current = null
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
void refreshGraph()
|
refreshGraph()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [doSetViewType, refreshGraph, syncWorkflowDraftImmediately, viewType])
|
}, [doSetViewType, refreshGraph, syncWorkflowDraftImmediately, viewType])
|
||||||
|
|||||||
Reference in New Issue
Block a user