Skip to content

Commit

Permalink
fix: getRepoInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
topliceanurazvan committed Apr 19, 2023
1 parent 2c58cc3 commit 4d63d54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/redux/thunks/setRootFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export const setRootFolder = createAsyncThunk<

Promise.all([getRepoInfo({path: rootFolder}), getChangedFiles({localPath: rootFolder, fileMap})])
.then(([repo, changedFiles]) => {
if (typeof repo !== 'object') {
thunkAPI.dispatch(setRepo(undefined));
thunkAPI.dispatch(setGitLoading(false));
return;
}

thunkAPI.dispatch(setRepo(repo));
thunkAPI.dispatch(setChangedFiles(changedFiles));
thunkAPI.dispatch(setGitLoading(false));
Expand Down

0 comments on commit 4d63d54

Please sign in to comment.