Skip to content

Commit

Permalink
chore: filter empty static templates
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Oct 16, 2023
1 parent c7d0f25 commit e7ea245
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mknodes/theme/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def get_resources(self) -> resources.Resources:
variables=tmpl_ctx,
)
req = [resources.CSSText(content=css_text, filename="mknodes_theme.css")]
return resources.Resources(css=req, templates=list(self.templates))
templates = [i for i in self.templates if i]
return resources.Resources(css=req, templates=templates)

def get_template_context(self) -> dict[str, Any]:
"""Return variables used to resolve the CSS template.
Expand Down

0 comments on commit e7ea245

Please sign in to comment.