diff options
author | Mark Chao <mchao@gitlab.com> | 2018-09-28 12:54:32 +0300 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-10-12 17:47:22 +0300 |
commit | 7e304896b979fc15d819f0bdf7488c78a1a55eb9 (patch) | |
tree | 6c590e4a84b55c77e19ce43efd029e024821a758 /lib | |
parent | c29d471f2386a3d798d24d7ece8939cc46fd3ee2 (diff) |
Fix MR discussion not loaded issue
Display `formatter` as the sole content of `position` object.
This means `diff_file` data is not referenced, which is the
caseu of "IOError: not opened for reading".
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/position.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index 978962ab2eb..300f37a95c1 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -69,6 +69,10 @@ module Gitlab JSON.generate(formatter.to_h, opts) end + def as_json(opts = nil) + to_h.as_json(opts) + end + def type formatter.line_age end |