Commit b0d3412e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/virtualScrollerDiscussionJSError' into 'master'

Fixes JS error when linking to a none diff discussion in diffs

See merge request gitlab-org/gitlab!65629
parents c44aad85 944b0478
......@@ -550,8 +550,8 @@ export default {
if (id.startsWith('#note_')) {
const noteId = id.replace('#note_', '');
const discussion = this.$store.state.notes.discussions.find((d) =>
d.notes.find((n) => n.id === noteId),
const discussion = this.$store.state.notes.discussions.find(
(d) => d.diff_file && d.notes.find((n) => n.id === noteId),
);
if (discussion) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment