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

Use elvis-operator rather than #try

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