From 34a78e1ea24cdea3a0f2d457238d25dc13c31775 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 11 Oct 2020 14:11:25 +0530 Subject: [PATCH] Check default front matter scope against symbols (#8393) Merge pull request 8393 --- lib/jekyll/frontmatter_defaults.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index acb665f0..3b0d0059 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -157,7 +157,7 @@ module Jekyll # Returns true if either of the above conditions are satisfied, # otherwise returns false def applies_type?(scope, type) - !scope.key?("type") || scope["type"].eql?(type.to_s) + !scope.key?("type") || type&.to_sym.eql?(scope["type"].to_sym) end # Checks if a given set of default values is valid