diff --git a/packages/server/src/sdk/app/applications/applications.ts b/packages/server/src/sdk/app/applications/applications.ts index e89aba5f48..865b277504 100644 --- a/packages/server/src/sdk/app/applications/applications.ts +++ b/packages/server/src/sdk/app/applications/applications.ts @@ -16,13 +16,7 @@ export function filterAppList(user: ContextUser, apps: App[]) { } else { return apps } - const finalApps: App[] = [] - for (let app of apps) { - if (appList.includes(dbCore.getProdAppID(app.appId))) { - finalApps.push(app) - } - } - return finalApps + return apps.filter(app => appList.includes(dbCore.getProdAppID(app.appId))) } export async function fetch(status: AppStatus, user: ContextUser) {