Prevent an internal error in include tag from non-string template_name

which would otherwise happen on `template_name.split('/')`
This commit is contained in:
Dylan Thacker-Smith
2022-10-28 13:59:00 -04:00
parent f484b868d0
commit db8e85ab31
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ module Liquid
def render_to_output_buffer(context, output)
template_name = context.evaluate(@template_name_expr)
raise ArgumentError, options[:locale].t("errors.argument.include") unless template_name
raise ArgumentError, options[:locale].t("errors.argument.include") unless template_name.is_a?(String)
partial = PartialCache.load(
template_name,