mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 09:50:48 -07:00
Merge pull request #1531 from Shopify/pz-array-fetch-warning
Fix warning about block and default value
This commit is contained in:
@@ -31,7 +31,11 @@ module Liquid
|
||||
if @registers.key?(key)
|
||||
@registers.fetch(key)
|
||||
elsif default != UNDEFINED
|
||||
@static.fetch(key, default, &block)
|
||||
if block_given?
|
||||
@static.fetch(key, &block)
|
||||
else
|
||||
@static.fetch(key, default)
|
||||
end
|
||||
else
|
||||
@static.fetch(key, &block)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user