Handle potential case where warnings returns nil

This commit is contained in:
Justin Li
2014-11-12 16:46:10 -05:00
parent 422bafd66a
commit 1673098126
+1 -1
View File
@@ -62,7 +62,7 @@ module Liquid
def warnings
all_warnings = []
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
all_warnings
end