Skip to content

Commit

Permalink
refactor(cache): tiny simplification to walkTree
Browse files Browse the repository at this point in the history
- the `acyclic` var is literally only used in one place, directly below it's instantiation
  - so don't use a var at all instead for simplicity
  • Loading branch information
agilgur5 committed Jun 12, 2022
1 parent 03cfb04 commit e548972
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tscache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ export class TsCache

public walkTree(cb: (id: string) => void | false): void
{
const acyclic = alg.isAcyclic(this.dependencyTree);

if (acyclic)
if (alg.isAcyclic(this.dependencyTree))
{
alg.topsort(this.dependencyTree).forEach(id => cb(id));
return;
Expand Down

0 comments on commit e548972

Please sign in to comment.