mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 19:00:39 -07:00
use bytesize, not length
This commit is contained in:
@@ -115,7 +115,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def check_resources(context, node_output)
|
||||
context.resource_limits.render_length += node_output.length
|
||||
context.resource_limits.render_length += node_output.bytesize
|
||||
return unless context.resource_limits.reached?
|
||||
raise MemoryError.new("Memory limits exceeded".freeze)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user