Commit ba5ba96f authored by Mike Greiling's avatar Mike Greiling

prevent 500 error when selecting changes tab for non-existent branch

parent 0f2bc494
......@@ -221,7 +221,7 @@ class MergeRequest < ActiveRecord::Base
# true base commit, so we can't simply have `#diff_base_commit` fall back on
# this method.
def likely_diff_base_commit
first_commit.parent || first_commit
first_commit.try(:parent) || first_commit
end
def diff_start_commit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment