map fulfilled promises

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

View File

@ -80,7 +80,9 @@ exports.fetch = async function(ctx) {
ctx.body = [] ctx.body = []
} else { } else {
const response = await Promise.allSettled(apps) 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} {#if selectedRows.length > 0}
<DeleteButton text small on:click={modal.show()}> <DeleteButton text small on:click={modal.show()}>
<Icon name="addrow" /> <Icon name="addrow" />
Delete {selectedRows.length} row(s) Delete
{selectedRows.length}
row(s)
</DeleteButton> </DeleteButton>
{/if} {/if}
</div> </div>