chore: remove useless void

This commit is contained in:
Joel
2026-01-21 14:07:19 +08:00
parent 478833f069
commit b94b7860d9

View File

@@ -72,19 +72,19 @@ const WorkflowViewContent = ({
const handleViewTypeChange = useCallback((type: ViewType) => {
if (viewType === ViewType.graph && type !== viewType)
pendingSyncRef.current = syncWorkflowDraftImmediately(true).catch(() => {})
pendingSyncRef.current = syncWorkflowDraftImmediately(true).catch(() => { })
doSetViewType(type)
if (type === ViewType.graph) {
const pending = pendingSyncRef.current
if (pending) {
pending.finally(() => {
void refreshGraph()
refreshGraph()
})
pendingSyncRef.current = null
}
else {
void refreshGraph()
refreshGraph()
}
}
}, [doSetViewType, refreshGraph, syncWorkflowDraftImmediately, viewType])