feat(web/checklist): Updates write mode validation in assigner node

Includes 'removeFirst' and 'removeLast' operations in the
set of conditions that bypass further validation checks.

Enhances logic to prevent unnecessary validation for
specific write operations.

Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
-LAN- 2025-04-30 15:01:49 +08:00
parent 5d13850758
commit 62c412f26d
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF

View File

@ -29,7 +29,7 @@ const nodeDefault: NodeDefault<AssignerNodeType> = {
if (!errorMessages && !value.variable_selector?.length)
errorMessages = t(`${i18nPrefix}.fieldRequired`, { field: t('workflow.nodes.assigner.assignedVariable') })
if (!errorMessages && value.operation !== WriteMode.clear) {
if (!errorMessages && value.operation !== WriteMode.clear && value.operation !== WriteMode.removeFirst && value.operation !== WriteMode.removeLast) {
if (value.operation === WriteMode.set || value.operation === WriteMode.increment
|| value.operation === WriteMode.decrement || value.operation === WriteMode.multiply
|| value.operation === WriteMode.divide) {