diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-23 21:27:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-23 21:27:09 +0300 |
commit | bcc70301531b6c3118120173389f2aaa7452bf11 (patch) | |
tree | 161f1ee56e15ec9e59f48c5e1a9cb86b62469a49 /app/assets/javascripts/diffs/store | |
parent | d47fc5085a706ab37d038636c9d5934da69853f0 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/assets/javascripts/diffs/store')
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index d469ed8ee82..fcc4a8160f4 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -748,9 +748,11 @@ export const setCurrentDiffFileIdFromNote = ({ commit, rootGetters }, noteId) => if (!note) return; - const fileHash = rootGetters.getDiscussion(note.discussion_id).diff_file.file_hash; + const fileHash = rootGetters.getDiscussion(note.discussion_id).diff_file?.file_hash; - commit(types.UPDATE_CURRENT_DIFF_FILE_ID, fileHash); + if (fileHash) { + commit(types.UPDATE_CURRENT_DIFF_FILE_ID, fileHash); + } }; export const navigateToDiffFileIndex = ({ commit, state }, index) => { |