From e1ff8ee6e8f7de3624e0cc92f0144fd2f1976726 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 8 Oct 2020 20:43:37 +0530 Subject: [PATCH] Simplify conditional in SeoTag::Drop#date_modified (#343) Merge pull request 343 --- lib/jekyll-seo-tag/drop.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/jekyll-seo-tag/drop.rb b/lib/jekyll-seo-tag/drop.rb index bd3710c..3ee277d 100644 --- a/lib/jekyll-seo-tag/drop.rb +++ b/lib/jekyll-seo-tag/drop.rb @@ -109,13 +109,7 @@ module Jekyll def date_modified @date_modified ||= begin - date = if page_seo["date_modified"] - page_seo["date_modified"] - elsif page["last_modified_at"] - page["last_modified_at"].to_liquid - else - page["date"] - end + date = page_seo["date_modified"] || page["last_modified_at"].to_liquid || page["date"] filters.date_to_xmlschema(date) if date end end