Merge pull request #1218 from Shopify/strainer/remove-safe-navigation

Remove handling of a nil context in the Strainer class
This commit is contained in:
Thierry Joyal
2020-01-07 11:54:49 -05:00
committed by GitHub
3 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ module Liquid
def invoke(method, *args)
if self.class.invokable?(method)
send(method, *args)
elsif @context&.strict_filters
elsif @context.strict_filters
raise Liquid::UndefinedFilter, "undefined filter #{method}"
else
args.first