Skip to content

Commit

Permalink
refactor(cache): tiny simplification to walkTree (#359)
Browse files Browse the repository at this point in the history
- the `acyclic` var is literally only used in one place, directly below its instantiation
  - so don't use a var at all instead for simplicity
  • Loading branch information
agilgur5 committed Jun 14, 2022
1 parent a31cda1 commit 42c94b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tscache.ts
Expand Up @@ -178,9 +178,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 42c94b8

Please sign in to comment.