Error 500 loading merge request: undefined method `index' for nil:NilClass
Sample URL: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2560
https://sentry.gitlap.com/gitlab/gitlabcom/issues/117782/
NoMethodError: undefined method `index' for nil:NilClass
app/models/concerns/discussion_on_diff.rb:42:in `truncated_diff_lines'
initial_line_index = [diff_line.index - NUMBER_OF_TRUNCATED_DIFF_LINES + 1, 0].max
app/views/discussions/_diff_with_notes.html.haml:14:in `_app_views_discussions__diff_with_notes_html_haml__1259625537446992796_69914473556600'
= render partial: "projects/diffs/line",
app/views/discussions/_discussion.html.haml:52:in `_app_views_discussions__discussion_html_haml__2606335003408593371_69914500681540'
= render "discussions/diff_with_notes", discussion: discussion
app/views/shared/notes/_notes.html.haml:6:in `block in _app_views_shared_notes__notes_html_haml___917864541839301731_69914493425640'
= render 'discussions/discussion', discussion: discussion
app/views/shared/notes/_notes.html.haml:2:in `each'
- @discussions.each do |discussion|
...
(222 additional frame(s) were not displayed)
ActionView::Template::Error: undefined method `index' for nil:NilClass
ActionView::Template::Error: undefined method `index' for nil:NilClass