summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/diff/file.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb
index dce80bf21de..c46087e65de 100644
--- a/lib/gitlab/diff/file.rb
+++ b/lib/gitlab/diff/file.rb
@@ -133,11 +133,15 @@ module Gitlab
end
def new_blob
- new_blob_lazy&.itself
+ strong_memoize(:new_blob) do
+ new_blob_lazy&.itself
+ end
end
def old_blob
- old_blob_lazy&.itself
+ strong_memoize(:old_blob) do
+ old_blob_lazy&.itself
+ end
end
def new_blob_lines_between(from_line, to_line)