Fix assignment with no effect outside of iterator

This commit is contained in:
Marcus Stollsteimer
2012-11-18 10:21:03 +01:00
parent c79abf1f87
commit afc3944a4a
+1
View File
@@ -168,6 +168,7 @@ module Liquid
# Fetches an object starting at the local scope and then moving up the hierachy
def find_variable(key)
scope = @scopes.find { |s| s.has_key?(key) }
variable = nil
if scope.nil?
@environments.each do |e|