fixed commit files not opening correctly

This commit is contained in:
Phil Hughes 2018-04-25 12:40:20 +01:00
parent af507c7944
commit 9f35f6d9d5
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
2 changed files with 5 additions and 1 deletions

View file

@ -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;
}

View file

@ -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 });