fix: open submodule instead of parent

This commit is contained in:
EnixCoda 2018-11-02 10:56:42 +08:00
parent 5898f23a2d
commit 12dee6bb70
No known key found for this signature in database
GPG key ID: 6825847C88AA329A

View file

@ -138,7 +138,7 @@ const handleKeyDown = dispatch => ({ key }) => dispatch(({ visibleNodes: { nodes
DOMHelper.loadWithPJAX(focusedNode.url)
} else if (focusedNode.type === 'commit') {
// redirect to its parent folder
DOMHelper.loadWithPJAX(focusedNode.parent.url)
window.open(focusedNode.url)
}
break
case 'Enter':
@ -149,7 +149,7 @@ const handleKeyDown = dispatch => ({ key }) => dispatch(({ visibleNodes: { nodes
DOMHelper.loadWithPJAX(focusedNode.url)
} else if (focusedNode.type === 'commit') {
// redirect to its parent folder
DOMHelper.loadWithPJAX(focusedNode.parent.url)
window.open(focusedNode.url)
}
break