Commit 9f35f6d9 authored by Phil Hughes's avatar Phil Hughes

fixed commit files not opening correctly

parent af507c79
...@@ -193,7 +193,7 @@ export const unstageChange = ({ commit }, path) => { ...@@ -193,7 +193,7 @@ export const unstageChange = ({ commit }, path) => {
}; };
export const openPendingTab = ({ commit, getters, dispatch, state }, { file, keyPrefix }) => { 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; return false;
} }
......
...@@ -192,6 +192,10 @@ export default { ...@@ -192,6 +192,10 @@ export default {
return acc.concat(f); 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 }); Object.assign(state, { openFiles });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment