diff --git a/src/apps.js b/src/apps.js index 8b882042d..f2e181495 100644 --- a/src/apps.js +++ b/src/apps.js @@ -1242,7 +1242,7 @@ async function install(data, auditSource) { const domainObjectMap = await validateLocations(locations); - if (settings.isDemo() && getCount() >= constants.DEMO_APP_LIMIT) throw new BoxError(BoxError.BAD_STATE, 'Too many installed apps, please uninstall a few and try again'); + if (settings.isDemo() && (await getCount() >= constants.DEMO_APP_LIMIT)) throw new BoxError(BoxError.BAD_STATE, 'Too many installed apps, please uninstall a few and try again'); const appId = uuid.v4(); debug('Will install app with id : ' + appId);