Skip to content

Commit

Permalink
Remove unused snapshots when updating with all
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Jan 24, 2021
1 parent 5e16d65 commit caf797b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export function decorateSnapshotUi({
const unused: string[] = [];

Object.values(globalState.snapshotStates).forEach((state) => {
if (globalState.updateSnapshot === 'all') {
state.removeUncheckedKeys();
}

unused.push(...state.getUncheckedKeys());

state.save();
Expand Down

0 comments on commit caf797b

Please sign in to comment.