Commit 5a2d9f66 authored by Phil Hughes's avatar Phil Hughes

only allow the call when not in collapsed view

[ci skip]
parent 05420006
...@@ -27,6 +27,8 @@ export const closeFile = ({ commit, state, dispatch }, { file, force = false }) ...@@ -27,6 +27,8 @@ export const closeFile = ({ commit, state, dispatch }, { file, force = false })
} else if (!state.openFiles.length) { } else if (!state.openFiles.length) {
pushState(file.parentTreeUrl); pushState(file.parentTreeUrl);
} }
dispatch('getLastCommitData');
}; };
export const setFileActive = ({ commit, state, getters, dispatch }, file) => { export const setFileActive = ({ commit, state, getters, dispatch }, file) => {
......
...@@ -111,8 +111,8 @@ export const createTempTree = ({ state, commit, dispatch }, name) => { ...@@ -111,8 +111,8 @@ export const createTempTree = ({ state, commit, dispatch }, name) => {
} }
}; };
export const getLastCommitData = ({ state, commit, dispatch }, tree = state) => { export const getLastCommitData = ({ state, commit, dispatch, getters }, tree = state) => {
if (tree.lastCommitPath === '') return; if (tree.lastCommitPath === '' || getters.isCollapsed) return;
service.getTreeLastCommit(tree.lastCommitPath) service.getTreeLastCommit(tree.lastCommitPath)
.then((res) => { .then((res) => {
......
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