Fix a JS crash when going from an interdiff to regular diff with commits.

Review Request #10309 — Created Nov. 6, 2018 and updated

david
Review Board
release-4.0.x
d1e1910...
reviewboard

While playing around with interdiffs on review requests that have commit
histories, I encountered a crash when navigating from an interdiff back
to a single diff. The cause of this is that the diff context payload had
a commit_history_diff of null, and we therefore weren't resetting
the history diff information in the model. The commit list would then
still think we were looking at an interdiff and try to index into a
commit that didn't exist.

Navigated around through a bunch of interdiffs and normal diffs. Saw
that things no longer crashed.

Checks run (2 succeeded)
flake8 passed.
JSHint passed.
brennie
  1. Ship It!
  2. 
      
Loading...