Move disabled check to block_body

This commit is contained in:
Mike Angell
2019-09-24 00:07:59 +10:00
parent 7f136c8fa6
commit 9f03dff79a
4 changed files with 37 additions and 2 deletions
+1
View File
@@ -154,6 +154,7 @@ module Liquid
private
def render_node(context, output, node)
node.disabled?(context, output) && return if node.is_a?(Tag)
node.render_to_output_buffer(context, output)
rescue UndefinedVariable, UndefinedDropMethod, UndefinedFilter => e
context.handle_error(e, node.line_number)
-1
View File
@@ -45,7 +45,6 @@ module Liquid
end
def render_to_output_buffer(context, output)
disabled?(context, output) && return
template_name = context.evaluate(@template_name_expr)
raise ArgumentError, options[:locale].t("errors.argument.include") unless template_name