avoid allocating new empty array

This commit is contained in:
Michael Go
2024-11-04 15:35:45 -04:00
parent 06f44226c0
commit 1f3ea7322b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ module Liquid
protected
def children
@node.respond_to?(:nodelist) ? Array(@node.nodelist) : []
@node.respond_to?(:nodelist) ? Array(@node.nodelist) : Const::EMPTY_ARRAY
end
end
end