`.present?` changed to `to_s.empty?` as `.present?` is rails specific

This commit is contained in:
Parth Modi 2017-05-24 22:35:07 +05:30
parent 1e6110ddef
commit ab49d7b5e8
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ module Jekyll
def canonical_url
@canonical_url ||= begin
if page["canonical_url"].present?
if !page["canonical_url"].to_s.empty?
page["canonical_url"]
else
filters.absolute_url(page["url"]).to_s.gsub(%r!/index\.html$!, "/")