From e5489727b414bd31552ae08264c92dc70825d2a0 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 11 Jun 2022 22:01:43 -0400 Subject: [PATCH] refactor(cache): tiny simplification to `walkTree` - 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 --- src/tscache.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tscache.ts b/src/tscache.ts index c4195a56..9dca957e 100644 --- a/src/tscache.ts +++ b/src/tscache.ts @@ -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;