Skip to content

Commit

Permalink
Applies performance tweak by @d13
Browse files Browse the repository at this point in the history
Co-authored-by: Keith Daulton <keith.daulton@gitkraken.com>
  • Loading branch information
nzaytsev and d13 authored Oct 18, 2024
1 parent f299976 commit 56e5711
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/telemetry/walkthroughStateProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ export class WalkthroughStateProvider implements Disposable {
}

get progress() {
const doneValues = [...filter(this.state.values(), x => x)].length;
return doneValues / Object.keys(WalkthroughContextKeys).length;
const allValues = this.state.values();
const doneValues = [...filter(allValues, x => x)].length;
return doneValues / allValues.length;
}

dispose(): void {
Expand Down

0 comments on commit 56e5711

Please sign in to comment.