fixed commit files not opening correctly
This commit is contained in:
parent
af507c7944
commit
9f35f6d9d5
2 changed files with 5 additions and 1 deletions
|
@ -193,7 +193,7 @@ export const unstageChange = ({ commit }, path) => {
|
|||
};
|
||||
|
||||
export const openPendingTab = ({ commit, getters, dispatch, state }, { file, keyPrefix }) => {
|
||||
if (getters.activeFile && getters.activeFile === file && state.viewer === 'diff') {
|
||||
if (getters.activeFile && getters.activeFile.path === file.path && state.viewer === 'diff') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -192,6 +192,10 @@ export default {
|
|||
|
||||
return acc.concat(f);
|
||||
}, []);
|
||||
} else {
|
||||
openFiles = state.openFiles.map(f =>
|
||||
Object.assign(f, { active: f.key === key, opened: f.key === key }),
|
||||
);
|
||||
}
|
||||
|
||||
Object.assign(state, { openFiles });
|
||||
|
|
Loading…
Reference in a new issue