Commit 7307fa48 authored by Rubén Dávila's avatar Rubén Dávila

Fix broken specs. #3945

parent f547e733
......@@ -104,7 +104,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@commit = @merge_request.last_commit
@first_commit = @merge_request.first_commit
@diffs = @merge_request.compare_diffs
@diff_refs = [@merge_request.target_sha, @merge_request.source_sha]
# We need to use #source_branch because #source_sha requires an existent MergeRequestDiff object.
@diff_refs = [@merge_request.target_sha, @merge_request.source_branch]
@ci_commit = @merge_request.ci_commit
@statuses = @ci_commit.statuses if @ci_commit
......
......@@ -73,7 +73,7 @@ module Gitlab
# Only update text if line is found. This will prevent
# issues with submodules given the line only exists in diff content.
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if line
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if highlighted_line
end
@lines
......
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