Commit 36408a64 authored by Alex Kalderimis's avatar Alex Kalderimis

Use elvis-operator rather than #try

parent ee46c405
......@@ -107,9 +107,7 @@ module DesignManagement
end
def diff_refs
strong_memoize(:diff_refs) do
head_version.try(:diff_refs)
end
strong_memoize(:diff_refs) { head_version&.diff_refs }
end
def clear_version_cache
......
......@@ -105,7 +105,7 @@ module DesignManagement
end
def diff_refs
strong_memoize(:diff_refs) { commit.try(:diff_refs) }
strong_memoize(:diff_refs) { commit&.diff_refs }
end
def reset
......
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