Fix a JS crash when going from an interdiff to regular diff with commits.
Review Request #1509 — Created Dec. 19, 2018 and updated
Information | |
---|---|
guest4459 | |
Review Board | |
Reviewers | |
cgh |
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. Testing done: Navigated around through a bunch of interdiffs and normal diffs. Saw that things no longer crashed. Reviewed at https://reviews.reviewboard.org/r/10309/