Fixed unit tests.
This commit is contained in:
parent
dc08ee4da4
commit
72a15b5039
@ -82,7 +82,7 @@ export default {
|
|||||||
]),
|
]),
|
||||||
select(id = this.node.item.id, doOpen = true) {
|
select(id = this.node.item.id, doOpen = true) {
|
||||||
const node = store.getters['explorer/nodeMap'][id];
|
const node = store.getters['explorer/nodeMap'][id];
|
||||||
if (!node || node.item.id === store.state.explorer.selectedId) {
|
if (!node) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
store.commit('explorer/setSelectedId', id);
|
store.commit('explorer/setSelectedId', id);
|
||||||
@ -91,7 +91,7 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (node.isFolder) {
|
if (node.isFolder) {
|
||||||
store.commit('explorer/toggleOpenNode', id);
|
store.commit('explorer/toggleOpenNode', id);
|
||||||
} else {
|
} else if (store.state.file.currentId !== id) {
|
||||||
store.commit('file/setCurrentId', id);
|
store.commit('file/setCurrentId', id);
|
||||||
badgeSvc.addBadge('switchFile');
|
badgeSvc.addBadge('switchFile');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user