Commit 18454292 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use try for commit prev_commit_id detection

parent 45b18365
......@@ -120,10 +120,10 @@ class Commit
end
def prev_commit
parents.first
parents.try :first
end
def prev_commit_id
prev_commit.id
prev_commit.try :id
end
end
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