Remove nil and empty string check in invoke_drop.

This commit is contained in:
Dylan Thacker-Smith
2015-11-09 15:03:36 -05:00
parent c38eec0293
commit bdb9a4a47f

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)