From 0b6eb6b71d5e53e7df5bd27706c44eb531bbee32 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Wed, 17 Nov 2021 21:33:35 +0000 Subject: [PATCH] Fixing issue discovered by test case. --- packages/server/src/api/controllers/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index 9061525ae5..ef2913e812 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -320,7 +320,7 @@ exports.delete = async ctx => { if (!env.isTest() && !ctx.query.unpublish) { await deleteApp(ctx.params.appId) } - if (ctx.query.unpublish) { + if (ctx.query && ctx.query.unpublish) { await cleanupAutomations(ctx.params.appId) } // make sure the app/role doesn't stick around after the app has been deleted