Use `is_a?` instead of `class`

This commit is contained in:
Alfred Xing 2014-07-21 09:23:21 -07:00
parent 4bd5614f4c
commit 7586538432
1 changed files with 1 additions and 1 deletions

View File

@ -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