Skip to content

Commit

Permalink
chore: fixes for immer
Browse files Browse the repository at this point in the history
  • Loading branch information
brayn003 committed Jan 13, 2025
1 parent 8e2b3ef commit bd7a581
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/client/src/git/store/actions/initGitActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ export interface InitGitForEditorPayload {

export const initGitForEditorAction =
createArtifactAction<InitGitForEditorPayload>((state) => {
state.ui.initializing = true;
state.ui.initialized = false;
// need to do this to avoid mutation, bug with redux-toolkit immer
const ui = {
...state.ui,
initializing: true,
initialized: false,
};

return state;
return { ...state, ui };
});

export const initGitForEditorSuccessAction = createArtifactAction((state) => {
Expand Down

0 comments on commit bd7a581

Please sign in to comment.