Commit 944b0478 authored by Phil Hughes's avatar Phil Hughes

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

parent 8e948357
......@@ -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