diff --git a/app/apps/client/admin/apps.js b/app/apps/client/admin/apps.js index a62184c7a720..86f32c90c23e 100644 --- a/app/apps/client/admin/apps.js +++ b/app/apps/client/admin/apps.js @@ -36,27 +36,25 @@ Template.apps.onCreated(function() { (async () => { try { - const appsFromMarketplace = await Apps.getAppsFromMarketplace().catch(() => []); const installedApps = await Apps.getApps(); + let apps = installedApps.map((app) => ({ ...app, installed: true })); + + this.state.set('apps', apps); + + const appsFromMarketplace = await Apps.getAppsFromMarketplace().catch(() => []); - const apps = installedApps.map((app) => { + apps = apps.map((app) => { const appFromMarketplace = appsFromMarketplace.find(({ id } = {}) => id === app.id); - if (!appFromMarketplace) { + if (appFromMarketplace) { return { ...app, - installed: true, + categories: appFromMarketplace.categories, + marketplaceVersion: appFromMarketplace.version, }; } - - return { - ...app, - installed: true, - categories: appFromMarketplace.categories, - marketplaceVersion: appFromMarketplace.version, - }; + return app; }); - this.state.set('apps', apps); } catch (error) { handleAPIError(error); diff --git a/package-lock.json b/package-lock.json index dee9cb46302a..31bc73de2f2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "Rocket.Chat", - "version": "3.0.0-develop", + "version": "3.1.0-develop", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2736,14 +2736,16 @@ }, "@rocket.chat/fuselage-ui-kit": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@rocket.chat/fuselage-ui-kit/-/fuselage-ui-kit-0.3.0.tgz", + "integrity": "sha512-V5HhWREpiTCkZ8ww5ow2Iafa9sB/uWGXEa5s0sOJEpGmgXZIRsUQlgcbD87Dm2fx57AXJR19Os4HxVNodF55Ow==", "requires": { "@rocket.chat/ui-kit": "^0.3.0" }, "dependencies": { "@rocket.chat/ui-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@rocket.chat/ui-kit/-/ui-kit-0.2.0.tgz", - "integrity": "sha512-O6QNicDDRRbiULWXdkVmgUl1Pf3CoVVA8L7JEfiegQcTdPEsHlWGYBxcpbt23gY4hoNmbknlJHfCPNWd7oLcmQ==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@rocket.chat/ui-kit/-/ui-kit-0.3.0.tgz", + "integrity": "sha512-YAV5l6iVIWuileg5DOU/0NQ/23/AULEr8UblIUSF3OShPN8nWanGMdG0E6xFLyXT+KHvmvzhiQe0/ju3Tk7x8A==" } } },