mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Remove extra OR condition since a missing hash key will return a nil anyway. Added a test to catch this nil condition since it was missing to begin with. Reduced line length in test_page.rb
This commit is contained in:
@@ -63,8 +63,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the String permalink or nil if none has been set.
|
||||
def permalink
|
||||
return nil if data.nil? || data['permalink'].nil?
|
||||
data['permalink']
|
||||
data.nil? ? nil : data['permalink']
|
||||
end
|
||||
|
||||
# The template of the permalink.
|
||||
|
||||
Reference in New Issue
Block a user