Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-13 18:08:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-13 18:08:23 +0300
commit868e4e69bba7d3ddc2bf4899ee45d6c377a8e536 (patch)
tree921098180de1fbf8e58cfaeade0d0999177b0ce6 /app/models/concerns/diff_positionable_note.rb
parent41e8b05e8d06f4b13a984e4a3ad26e9a48294543 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/diff_positionable_note.rb')
-rw-r--r--app/models/concerns/diff_positionable_note.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/diff_positionable_note.rb b/app/models/concerns/diff_positionable_note.rb
index 8590bc7f4eb..cea3c7d119c 100644
--- a/app/models/concerns/diff_positionable_note.rb
+++ b/app/models/concerns/diff_positionable_note.rb
@@ -23,6 +23,8 @@ module DiffPositionableNote
if new_position.is_a?(Hash)
new_position = new_position.with_indifferent_access
new_position = Gitlab::Diff::Position.new(new_position)
+ elsif !new_position.is_a?(Gitlab::Diff::Position)
+ new_position = nil
end
return if new_position == read_attribute(meth)