mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Remove nil and empty string check in invoke_drop.
This commit is contained in:
+1
-3
@@ -23,8 +23,6 @@ module Liquid
|
|||||||
class Drop
|
class Drop
|
||||||
attr_writer :context
|
attr_writer :context
|
||||||
|
|
||||||
EMPTY_STRING = ''.freeze
|
|
||||||
|
|
||||||
# Catch all for the method
|
# Catch all for the method
|
||||||
def liquid_method_missing(_method)
|
def liquid_method_missing(_method)
|
||||||
nil
|
nil
|
||||||
@@ -32,7 +30,7 @@ module Liquid
|
|||||||
|
|
||||||
# called by liquid to invoke a drop
|
# called by liquid to invoke a drop
|
||||||
def invoke_drop(method_or_key)
|
def invoke_drop(method_or_key)
|
||||||
if method_or_key && method_or_key != EMPTY_STRING && self.class.invokable?(method_or_key)
|
if self.class.invokable?(method_or_key)
|
||||||
send(method_or_key)
|
send(method_or_key)
|
||||||
else
|
else
|
||||||
liquid_method_missing(method_or_key)
|
liquid_method_missing(method_or_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user