1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: sort frontend api features by name (#6479)

This commit is contained in:
Jaanus Sellin 2024-03-08 15:34:33 +02:00 committed by GitHub
parent 2e6d91846b
commit 381af7835b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {