fix: allow components to accept default fill even if no default slot encountered during rendering (#780)

This commit is contained in:
Juro Oravec 2024-11-26 17:42:00 +01:00 committed by GitHub
parent c0a4fd5f68
commit 9f98c7e4df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 82 additions and 48 deletions

View file

@ -716,10 +716,6 @@ class Component(
# Get the component's HTML
html_content = template.render(context)
# After we've rendered the contents, we now know what slots were there,
# and thus we can validate that.
component_slot_ctx.post_render_validation()
# Allow to optionally override/modify the rendered content
new_output = self.on_render_after(context, template, html_content)
html_content = new_output if new_output is not None else html_content