Don't yield content if there's not any content_for it

This commit is contained in:
Sdogruyol 2016-07-10 13:24:38 +03:00
parent f3175bdb72
commit ce2ffed705
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ macro content_for(key)
end
macro yield_content(key)
CONTENT_FOR_BLOCKS[{{key}}].call
CONTENT_FOR_BLOCKS[{{key}}].call if CONTENT_FOR_BLOCKS.has_key?({{key}})
end
macro render(filename, layout)