Javascript error when jumping to unresolved discussions

Summary

If you have open discussions on your merge request that are not placed on a diff, you cant jump to the discussion and get a javascript error instead.
It doesn't work for the 'first unresolved discussion'-button nor the 'jump to next discussion'-button

tested on firefox on xubuntu 18.04

Reported this before (#59333 (closed)), but my testcase had been fixed. Current testcase is still broken.

Steps to reproduce

  • Open a merge request
  • create a discussion that is not on a diff
  • create a discussion on a diff
  • do NOT refresh but switch back to the discussions tab
  • try to jump to the first unresolved discussion
  • create a second discussion also not on a diff
  • jump from the first discussion to the next

Example Project

Pandabehr/example!10

What is the current bug behavior?

It doesn't jump anywhere and just gives an error in your console

What is the expected correct behavior?

It should jump to the first/next unresolved discussion

Relevant logs and/or screenshots

 TypeError: "a.diff_file is undefined"   console.js:32
    r actions.js:106
    A actions.js:106
    h vuex.esm.js:721
    dispatch vuex.esm.js:428
    dispatch vuex.esm.js:322
    P actions.js:22
    h vuex.esm.js:721
    dispatch vuex.esm.js:428
    dispatch vuex.esm.js:322
    i vuex.esm.js:924
    discussionJump discussion_navigation.js:28
    jumpToDiscussion discussion_navigation.js:51
    jumpToFirstUnresolvedDiscussion discussion_counter.vue:45
    VueJS 3
    a raven.js:360

Output of checks

This bug happens on GitLab.com

Edited Jun 21, 2019 by Pandabehr
Assignee Loading
Time tracking Loading