Skip to content

Commit

Permalink
fix: initial compare state on setRootFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
topliceanurazvan committed Mar 14, 2023
1 parent ea390f5 commit 36806db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/redux/compare/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {Draft, PayloadAction, createSlice} from '@reduxjs/toolkit';
import {WritableDraft} from 'immer/dist/internal';
import log from 'loglevel';

import {setRootFolder} from '@redux/thunks/setRootFolder';

import {
CompareFilter,
CompareOperation,
Expand Down Expand Up @@ -246,6 +248,9 @@ export const compareSlice = createSlice({
}
});
});
builder.addCase(setRootFolder.fulfilled, state => {
state.current = initialState.current;
});
},
});

Expand Down

0 comments on commit 36806db

Please sign in to comment.