Convertible#validate_permalink!: ensure the return value of data["permalink"] is a string before asking if it is empty

This commit is contained in:
Parker Moore 2017-02-10 21:56:43 -05:00
parent 98e19c3cf5
commit 5bc67c1fb7
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ module Jekyll
end
def validate_permalink!(filename)
if self.data["permalink"] && self.data["permalink"].empty?
if self.data["permalink"] && self.data["permalink"].to_s.empty?
raise Errors::InvalidPermalinkError, "Invalid permalink in #{filename}"
end
end