Use `is_a?` instead of `class`
This commit is contained in:
parent
4bd5614f4c
commit
7586538432
|
@ -159,7 +159,7 @@ module Jekyll
|
|||
#
|
||||
# Returns true if the layout is invalid, false if otherwise
|
||||
def invalid_layout?(layout)
|
||||
!data["layout"].nil? && data["layout"] != "none" && layout.nil? && self.class.to_s != "Jekyll::Excerpt"
|
||||
!data["layout"].nil? && data["layout"] != "none" && layout.nil? && !(self.is_a? Jekyll::Excerpt)
|
||||
end
|
||||
|
||||
# Recursively render layouts
|
||||
|
|
Loading…
Reference in New Issue