Skip to content

Commit

Permalink
cleaner filter
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprudhomme committed Nov 26, 2024
1 parent 7674f10 commit 9eeba4a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ function filterRecommendationControllers<
const isRecommendationController = (key: string) =>
name.includes(key) && whitelist.includes(key);

Object.entries(controllers)
.filter(([key, _]) => isRecommendationController(key))
.forEach(([_, controller]) =>
(controller as Recommendations).refresh?.()
);
for (const [key, controller] of Object.entries(controllers)) {
if (isRecommendationController(key)) {
(controller as Recommendations).refresh?.();
}
}
},
};
}

0 comments on commit 9eeba4a

Please sign in to comment.