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

View file

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