map fulfilled promises

This commit is contained in:
Martin McKeaveney 2020-11-23 16:42:28 +00:00
parent bfab74d11f
commit cee26fb0b6
2 changed files with 6 additions and 2 deletions

View File

@ -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)
}
}

View File

@ -147,7 +147,9 @@
{#if selectedRows.length > 0}
<DeleteButton text small on:click={modal.show()}>
<Icon name="addrow" />
Delete {selectedRows.length} row(s)
Delete
{selectedRows.length}
row(s)
</DeleteButton>
{/if}
</div>