From cee26fb0b6a9835abae7e4daf719c9f028935bb5 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 23 Nov 2020 16:42:28 +0000 Subject: [PATCH] map fulfilled promises --- packages/server/src/api/controllers/application.js | 4 +++- packages/standard-components/src/DataGrid/Component.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index c4d55d631b..f05430e05a 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -80,7 +80,9 @@ exports.fetch = async function(ctx) { ctx.body = [] } else { const response = await Promise.allSettled(apps) - ctx.body = response.filter(result => result.status === "fulfilled") + ctx.body = response + .filter(result => result.status === "fulfilled") + .map(({ value }) => value) } } diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index fb8ce2ebc4..369d7bb2d2 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -147,7 +147,9 @@ {#if selectedRows.length > 0} - Delete {selectedRows.length} row(s) + Delete + {selectedRows.length} + row(s) {/if}