mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
tablerow: Avoid accidental special case for constant nil cols (#1644)
It should behave the same as an expression that evaluates to nil
This commit is contained in:
@@ -51,7 +51,7 @@ module Liquid
|
||||
collection = Utils.slice_collection(collection, from, to)
|
||||
length = collection.length
|
||||
|
||||
cols = @attributes['cols'].nil? ? length : context.evaluate(@attributes['cols']).to_i
|
||||
cols = @attributes.key?('cols') ? context.evaluate(@attributes['cols']).to_i : length
|
||||
|
||||
output << "<tr class=\"row1\">\n"
|
||||
context.stack do
|
||||
|
||||
Reference in New Issue
Block a user