Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jun 27, 2014
1 parent 02f3003 commit 6e0130e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/capybara/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ def to_regexp(text)
# @return [String] The modified HTML code
#
def inject_asset_host(html)
if Capybara.asset_host and
Nokogiri::HTML(html).css("base").empty? and
if Capybara.asset_host && Nokogiri::HTML(html).css("base").empty?
match = html.match(/<head[^<]*?>/)
html.clone.insert match.end(0), "<base href='#{Capybara.asset_host}' />"
end
else
html
end
Expand Down

0 comments on commit 6e0130e

Please sign in to comment.