diff --git a/lib/liquid/tags/for.rb b/lib/liquid/tags/for.rb index 33f12af..05b1b93 100644 --- a/lib/liquid/tags/for.rb +++ b/lib/liquid/tags/for.rb @@ -99,7 +99,7 @@ module Liquid # Store our progress through the collection for the continue flag context.registers[:for][@name] = from + segment.length - parent_loop = context['forloop'.freeze] + parent_loop = context.find_variable('forloop'.freeze) context.stack do segment.each_with_index do |item, index|