Handle nil exception

This commit is contained in:
Kyle Niewiada 2017-04-12 10:51:49 -04:00
parent aa0b47bb8d
commit 03cd692f99
1 changed files with 3 additions and 1 deletions

View File

@ -97,8 +97,10 @@ module Jekyll
@date_modified ||= begin
date = if page["seo"] && page["seo"]["date_modified"]
page["seo"]["date_modified"]
elsif page["last_modified_at"]
page["last_modified_at"].to_liquid
else
page["last_modified_at"].to_liquid || page["date"]
page["date"]
end
filters.date_to_xmlschema(date) if date
end