Skip to content

Commit

Permalink
fix: check valid for number variable (#11334)
Browse files Browse the repository at this point in the history
  • Loading branch information
YIXIAO0 authored Dec 4, 2024
1 parent 91e1ff5 commit f933af9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/app/components/workflow/nodes/assigner/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const nodeDefault: NodeDefault<AssignerNodeType> = {
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t('workflow.nodes.assigner.assignedVariable') })

if (!errorMessages && value.operation !== WriteMode.clear) {
if (value.operation === WriteMode.set) {
if (value.operation === WriteMode.set || value.operation === WriteMode.increment
|| value.operation === WriteMode.decrement || value.operation === WriteMode.multiply
|| value.operation === WriteMode.divide) {
if (!value.value && typeof value.value !== 'number')
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t('workflow.nodes.assigner.variable') })
}
Expand Down

0 comments on commit f933af9

Please sign in to comment.