diff --git a/server/openExternal.js b/server/openExternal.js index e749590..1bd8e62 100644 --- a/server/openExternal.js +++ b/server/openExternal.js @@ -57,6 +57,8 @@ exports.openExternal = (query, res) => { } sendRes(res, result) + } else { + sendEmptyRes(res) } }) break diff --git a/store/actions.js b/store/actions.js index 0e76334..b328e08 100644 --- a/store/actions.js +++ b/store/actions.js @@ -327,17 +327,21 @@ export default { async changePath ({commit, dispatch}) { const {data} = await axios.get('openThis?type=dialog') - commit('emptyLocals') - commit('setCurrentDir', data.path) - dispatch('refreshLocal') + if (data) { + commit('emptyLocals') + commit('setCurrentDir', data.path) + dispatch('refreshLocal') + } }, async changePathWithConfig ({commit, dispatch}) { const {data} = await axios.get('openThis?type=dialog') - commit('emptyLocals') - commit('setCurrentDir', data.path) - commit('setConfigDir', data.path) - dispatch('refreshLocal') + if (data) { + commit('emptyLocals') + commit('setCurrentDir', data.path) + commit('setConfigDir', data.path) + dispatch('refreshLocal') + } }, async openNewsLink ({state}, link) { log(`Opening ${link}`)