Remove ES6 optional chaining from server package

This commit is contained in:
Andrew Kingston 2021-07-05 17:05:34 +01:00
parent c49338b4c1
commit 27a03f7d35
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ exports.fetchAppPackage = async function (ctx) {
let screens = await getScreens(db)
// Only filter screens if the user is not a builder
if (!ctx.user.builder?.global) {
if (!(ctx.user.builder && ctx.user.builder.global)) {
const userRoleId = getUserRoleId(ctx)
const accessController = new AccessController(ctx.params.appId)
screens = await accessController.checkScreensAccess(screens, userRoleId)