From 05efe1414e99d57959b96045f4b7996d8bce0e7a Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Thu, 28 Jul 2022 17:31:41 +0200 Subject: [PATCH] fix: sortOrder updates needs to be async Co-authored-by: Simon Hornby --- src/lib/services/feature-toggle-service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/services/feature-toggle-service.ts b/src/lib/services/feature-toggle-service.ts index eeb1156445..b04f52ea3e 100644 --- a/src/lib/services/feature-toggle-service.ts +++ b/src/lib/services/feature-toggle-service.ts @@ -288,9 +288,9 @@ class FeatureToggleService { sortOrders: SetStrategySortOrderSchema, ): Promise> { await Promise.all( - sortOrders.map(({ id, sortOrder }) => { - this.featureStrategiesStore.updateSortOrder(id, sortOrder); - }), + sortOrders.map(async ({ id, sortOrder }) => + this.featureStrategiesStore.updateSortOrder(id, sortOrder), + ), ); }