Check default front matter scope against symbols (#8393)

Merge pull request 8393
This commit is contained in:
Ashwin Maroli 2020-10-11 14:11:25 +05:30 committed by GitHub
parent 6d30bac845
commit 34a78e1ea2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ module Jekyll
# Returns true if either of the above conditions are satisfied, # Returns true if either of the above conditions are satisfied,
# otherwise returns false # otherwise returns false
def applies_type?(scope, type) 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 end
# Checks if a given set of default values is valid # Checks if a given set of default values is valid