fix: stop checking empty action/trigger input in updateStep
This commit is contained in:
@@ -40,6 +40,8 @@ class App {
|
|||||||
static async checkAppAndAction(appKey: string, actionKey: string): Promise<void> {
|
static async checkAppAndAction(appKey: string, actionKey: string): Promise<void> {
|
||||||
const app = await this.findOneByKey(appKey);
|
const app = await this.findOneByKey(appKey);
|
||||||
|
|
||||||
|
if (!actionKey) return;
|
||||||
|
|
||||||
const hasAction = app.actions?.find(action => action.key === actionKey);
|
const hasAction = app.actions?.find(action => action.key === actionKey);
|
||||||
|
|
||||||
if (!hasAction) {
|
if (!hasAction) {
|
||||||
@@ -50,6 +52,8 @@ class App {
|
|||||||
static async checkAppAndTrigger(appKey: string, triggerKey: string): Promise<void> {
|
static async checkAppAndTrigger(appKey: string, triggerKey: string): Promise<void> {
|
||||||
const app = await this.findOneByKey(appKey);
|
const app = await this.findOneByKey(appKey);
|
||||||
|
|
||||||
|
if (!triggerKey) return;
|
||||||
|
|
||||||
const hasTrigger = app.triggers?.find(trigger => trigger.key === triggerKey);
|
const hasTrigger = app.triggers?.find(trigger => trigger.key === triggerKey);
|
||||||
|
|
||||||
if (!hasTrigger) {
|
if (!hasTrigger) {
|
||||||
|
Reference in New Issue
Block a user