From ce2ffed705dc4b300127e2632062a9a8e4367ac6 Mon Sep 17 00:00:00 2001 From: Sdogruyol Date: Sun, 10 Jul 2016 13:24:38 +0300 Subject: [PATCH] Don't yield content if there's not any content_for it --- src/kemal/helpers/macros.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kemal/helpers/macros.cr b/src/kemal/helpers/macros.cr index b785993..55b2884 100644 --- a/src/kemal/helpers/macros.cr +++ b/src/kemal/helpers/macros.cr @@ -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)