Skip to content

Commit

Permalink
Merge pull request #9902 from micalevisk/refactor/use-builtin-node12-…
Browse files Browse the repository at this point in the history
…functions

refactor(core): replace our own 1-level flatten by the native one
  • Loading branch information
kamilmysliwiec committed Jul 11, 2022
2 parents b449b5a + 0c2a6d1 commit 9f90706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ export class DependenciesScanner {
}

private flatten<T = any>(arr: T[][]): T[] {
return arr.reduce((a: T[], b: T[]) => a.concat(b), []);
return arr.flat(1);
}

private isRequestOrTransient(scope: Scope): boolean {
Expand Down

0 comments on commit 9f90706

Please sign in to comment.