mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-01 13:47:27 +02:00
feat: minor comment updates
This commit is contained in:
parent
8425fd48e9
commit
2b46a21f21
@ -1,4 +1,3 @@
|
|||||||
// use generics here to make it easier to test
|
|
||||||
export const sortStrategiesByFeature = <
|
export const sortStrategiesByFeature = <
|
||||||
ExistingStrategy extends { id: string; featureName?: string },
|
ExistingStrategy extends { id: string; featureName?: string },
|
||||||
UpdatedStrategy extends {
|
UpdatedStrategy extends {
|
||||||
@ -17,9 +16,9 @@ export const sortStrategiesByFeature = <
|
|||||||
const collected = [...strategies, ...changeRequestStrategies].reduce(
|
const collected = [...strategies, ...changeRequestStrategies].reduce(
|
||||||
(acc, strategy) => {
|
(acc, strategy) => {
|
||||||
if (!strategy.featureName) {
|
if (!strategy.featureName) {
|
||||||
// this shouldn't ever happen here, but if it does,
|
// this shouldn't ever happen here, but because the
|
||||||
// we'll remove it because we don't know what to do
|
// type system allows it to, we need to handle it. If
|
||||||
// with it.
|
// a strategy doesn't have a feature name, discard it.
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
const registered = acc[strategy.featureName];
|
const registered = acc[strategy.featureName];
|
||||||
|
Loading…
Reference in New Issue
Block a user