mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 03:21:42 +00:00
bug sutil que hacía fallar has_field
This commit is contained in:
parent
639ec4b5cc
commit
f5635aa2c8
1 changed files with 5 additions and 1 deletions
|
@ -327,7 +327,11 @@ class Post
|
|||
|
||||
# Como get_front_matter pero con un valor por defecto
|
||||
def fetch_front_matter(name, default)
|
||||
get_front_matter(name) || default
|
||||
r = get_front_matter(name)
|
||||
|
||||
# Solo cuando es nulo, sino devolvemos el default si el valor es
|
||||
# false
|
||||
r.nil? ? default : r
|
||||
end
|
||||
|
||||
# Trae el template a partir del layout
|
||||
|
|
Loading…
Reference in a new issue