mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
'contains' operator returns false if either operand is nil
This commit is contained in:
@@ -15,7 +15,7 @@ module Liquid
|
||||
'>' => :>,
|
||||
'>=' => :>=,
|
||||
'<=' => :<=,
|
||||
'contains' => lambda { |cond, left, right| left.include?(right) },
|
||||
'contains' => lambda { |cond, left, right| left && right ? left.include?(right) : false }
|
||||
}
|
||||
|
||||
def self.operators
|
||||
|
||||
Reference in New Issue
Block a user