From 43f44d1bbe7a29038e38c15d8b21301360db5add Mon Sep 17 00:00:00 2001 From: Parker Moore <237985+parkr@users.noreply.github.com> Date: Tue, 1 Feb 2022 22:15:34 -0800 Subject: [PATCH] Update lib/jekyll-seo-tag/json_ld_drop.rb Co-authored-by: Ashwin Maroli --- lib/jekyll-seo-tag/json_ld_drop.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll-seo-tag/json_ld_drop.rb b/lib/jekyll-seo-tag/json_ld_drop.rb index 95c2c74..d51404f 100644 --- a/lib/jekyll-seo-tag/json_ld_drop.rb +++ b/lib/jekyll-seo-tag/json_ld_drop.rb @@ -92,7 +92,7 @@ module Jekyll def to_json(state = nil) keys.sort.each_with_object({}) do |(key, _), result| v = self[key] - result[key] = v if v # don't write if value is nil + result[key] = v unless v.nil? end.to_json(state) end