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