From 03cd692f99e6310f8c313a81ecbbfffda40e87fc Mon Sep 17 00:00:00 2001 From: Kyle Niewiada Date: Wed, 12 Apr 2017 10:51:49 -0400 Subject: [PATCH] Handle nil exception --- lib/jekyll-seo-tag/drop.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/jekyll-seo-tag/drop.rb b/lib/jekyll-seo-tag/drop.rb index 56d1e0b..ba80506 100644 --- a/lib/jekyll-seo-tag/drop.rb +++ b/lib/jekyll-seo-tag/drop.rb @@ -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