From 71dcabec25b41a125e88563cb090481fe012b1e5 Mon Sep 17 00:00:00 2001 From: Junyi Date: Thu, 9 Feb 2023 16:24:51 +0800 Subject: [PATCH] fix(plugin-workflow): fix schedule on field null value (#1442) --- packages/plugins/workflow/src/server/triggers/schedule.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugins/workflow/src/server/triggers/schedule.ts b/packages/plugins/workflow/src/server/triggers/schedule.ts index 75d5c3789..845eb4675 100644 --- a/packages/plugins/workflow/src/server/triggers/schedule.ts +++ b/packages/plugins/workflow/src/server/triggers/schedule.ts @@ -124,6 +124,9 @@ function getOnTimestampWithOffset(on, now: Date) { } function getDataOptionTime(data, on, dir = 1) { + if (!on) { + return null; + } switch (typeof on) { case 'string': const time = parseDateWithoutMs(on);