Resolve "Error 500 loading merge request: undefined method `index' for nil:NilClass"
What does this MR do?
Fixes a 500 error with an invalid legacy diff note on a page.
Are there points in the code the reviewer needs to double check?
This doesn't do anything useful, it just doesn't blow up (see screenshot). Should we do more?
Why was this MR needed?
If a legacy diff note is wrong, this will blow up.
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Tests added for this feature/bug
- Has been reviewed by Backend
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
End-to-end tests pass (
package-qamanual pipeline job)
What are the relevant issue numbers?
Closes #42160 (closed).