diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2019-08-12 09:41:04 +0300 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-08-12 09:41:04 +0300 |
commit | eba44228039d54ef3b84db4cf695a9058beb166d (patch) | |
tree | ce0702fed1d4854c2961db48db913059d193c0d5 /app/assets/javascripts/diffs/store | |
parent | ff81c0a35a44f8f57e9b87787f74e66aa47b4f88 (diff) |
Add kbd shortcuts for discussion navigation
Add keyboard shortcuts `p` and `n` to navigate duscussions.
Diffstat (limited to 'app/assets/javascripts/diffs/store')
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index 8434ef5cc7a..6695d9fe96c 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -109,7 +109,7 @@ export const toggleLineDiscussions = ({ commit }, options) => { export const renderFileForDiscussionId = ({ commit, rootState, state }, discussionId) => { const discussion = rootState.notes.discussions.find(d => d.id === discussionId); - if (discussion) { + if (discussion && discussion.diff_file) { const file = state.diffFiles.find(f => f.file_hash === discussion.diff_file.file_hash); if (file) { |