make Template override static registers only when the register key is not defined

This commit is contained in:
Feken Baboyan
2020-05-28 09:08:03 -04:00
parent 18654526c8
commit 8541c6be35
2 changed files with 45 additions and 1 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ module Liquid
end
Template.registers.each do |key, register|
context_register[key] = register
context_register[key] = register unless context_register.key?(key)
end
# Retrying a render resets resource usage