From 381af7835bfc0e0e892879490f874314d9aba477 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 8 Mar 2024 15:34:33 +0200 Subject: [PATCH] feat: sort frontend api features by name (#6479) --- src/lib/routes/proxy-api/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/routes/proxy-api/index.ts b/src/lib/routes/proxy-api/index.ts index 69d0543cbc..395ed66885 100644 --- a/src/lib/routes/proxy-api/index.ts +++ b/src/lib/routes/proxy-api/index.ts @@ -188,11 +188,14 @@ export default class FrontendAPIController extends Controller { FrontendAPIController.createContext(req), ), ]); - if (!isEqual(toggles, newToggles)) { + if ( + !isEqual( + toggles.sort((a, b) => a.name.localeCompare(b.name)), + newToggles.sort((a, b) => a.name.localeCompare(b.name)), + ) + ) { this.logger.warn( - 'old features and new feature are different', - toggles.length, - newToggles.length, + `old features and new features are different. Old count ${toggles.length}, new count ${newToggles.length}`, ); } } else {