mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-02 16:45:12 -07:00
Handle potential case where warnings returns nil
This commit is contained in:
@@ -62,7 +62,7 @@ module Liquid
|
|||||||
def warnings
|
def warnings
|
||||||
all_warnings = []
|
all_warnings = []
|
||||||
nodelist.each do |node|
|
nodelist.each do |node|
|
||||||
all_warnings.concat(node.warnings) if node.respond_to?(:warnings)
|
all_warnings.concat(node.warnings || []) if node.respond_to?(:warnings)
|
||||||
end
|
end
|
||||||
all_warnings
|
all_warnings
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user