Merge pull request #667 from Shopify/remove-empty-string-check

Remove nil and empty string check in invoke_drop.
This commit is contained in:
Dylan Thacker-Smith
2015-11-10 10:43:11 -05:00

View File

@@ -23,8 +23,6 @@ module Liquid
class Drop
attr_writer :context
EMPTY_STRING = ''.freeze
# Catch all for the method
def liquid_method_missing(_method)
nil
@@ -32,7 +30,7 @@ module Liquid
# called by liquid to invoke a drop
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)
else
liquid_method_missing(method_or_key)