mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
the variables should be stored in the normal environment, not in the register
This commit is contained in:
@@ -25,8 +25,8 @@ module Liquid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
value = context.registers[@variable] ||= 0
|
value = context.environments.first[@variable] ||= 0
|
||||||
context.registers[@variable] = value + 1
|
context.environments.first[@variable] = value + 1
|
||||||
value.to_s
|
value.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user