file is displayed twice in merge request diff view

Summary

After unchecking and re-checking 'Show one file', the selected file will be shown twice in the Diff panel.

Steps to reproduce

  • Open the merge request and view the diff
  • enable "Show one file" in the preferences
  • reload the page
  • open the merge request and view the diff
  • disable "Show one file" in the preferences
  • enable "Show one file" in the preferences

What is the current bug behavior?

The selected file will appear twice in the right diff panel.

What is the expected correct behavior?

The file should only be displayed once.