Skip to content

Commit

Permalink
handle nil value for key when strict_variables is on, Fixes Shopify#749
Browse files Browse the repository at this point in the history
  • Loading branch information
nijikon committed Apr 25, 2016
1 parent e4cf55b commit bcfaba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/liquid/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def find_variable(key)
if scope.nil?
@environments.each do |e|
variable = lookup_and_evaluate(e, key)
unless variable.nil?
if @strict_variables || !variable.nil?
scope = e
break
end
Expand Down

0 comments on commit bcfaba5

Please sign in to comment.