1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: sortOrder updates needs to be async

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
This commit is contained in:
Christopher Kolstad 2022-07-28 17:31:41 +02:00
parent 2bdc1031d6
commit 05efe1414e
No known key found for this signature in database
GPG Key ID: 559ACB0E3DB5538A

View File

@ -288,9 +288,9 @@ class FeatureToggleService {
sortOrders: SetStrategySortOrderSchema,
): Promise<Saved<any>> {
await Promise.all(
sortOrders.map(({ id, sortOrder }) => {
this.featureStrategiesStore.updateSortOrder(id, sortOrder);
}),
sortOrders.map(async ({ id, sortOrder }) =>
this.featureStrategiesStore.updateSortOrder(id, sortOrder),
),
);
}