diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index 4500aeff..793bf137 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -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|