From 0623dc298119147463db2804298964742cb323ec 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