From b8c10c9e9f9855b4d0084874dc0812fdf595f769 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 26 Oct 2021 09:42:19 +0100 Subject: [PATCH] Linting --- packages/server/src/middleware/currentapp.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/middleware/currentapp.js b/packages/server/src/middleware/currentapp.js index 505bebc694..01b9dcc248 100644 --- a/packages/server/src/middleware/currentapp.js +++ b/packages/server/src/middleware/currentapp.js @@ -36,7 +36,10 @@ module.exports = async (ctx, next) => { } // deny access to application preview - if (isDevAppID(requestAppId) && (!ctx.user || !ctx.user.builder?.global)) { + if ( + isDevAppID(requestAppId) && + (!ctx.user || !ctx.user.builder || !ctx.user.builder.global) + ) { clearCookie(ctx, Cookies.CurrentApp) return ctx.redirect("/") }