Skip to content

Commit

Permalink
utils: simplify map + flat in injections providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed Sep 20, 2023
1 parent 97e9652 commit c4849e0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ export function getInjectionProviders(
// get injection tokens of the matched providers, if any
search = match
.filter(p => (p as any)?.inject)
.map(p => (p as FactoryProvider).inject)
.flat()
.flatMap(p => (p as FactoryProvider).inject)
.map(mapInjectToTokens);
}
return result;
Expand Down

0 comments on commit c4849e0

Please sign in to comment.