Fix bug where template with multiple component_block tags could raise KeyError (#19)

Co-authored-by: rbeard0330 <@dul2k3BKW6m>
This commit is contained in:
rbeard0330 2020-12-30 02:01:57 -05:00 committed by GitHub
parent ed3f3125da
commit 979dc82eda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 6 deletions

View file

@ -45,7 +45,7 @@ class Component(with_metaclass(MediaDefiningClass)):
return NodeList(node for node in template.template.nodelist if is_slot_node(node))
def render(self, context, slots_filled=None):
slots_filled = slots_filled or []
slots_filled = slots_filled or {}
template = get_template(self.template(context))
slots_in_template = self.slots_in_template(template)