Skip to content

Commit

Permalink
fix None attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
kierangillblueberry committed Aug 1, 2024
1 parent 3f725f3 commit cd75bac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_vite/core/tag_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def stylesheet(href: str, attrs: Optional[Dict[str, str]] = None) -> Tag:
str -- CSS link tag.
"""

attrs_str = attrs_to_str(attrs)
attrs_str = attrs_to_str(attrs if attrs else {})

return f'<link {attrs_str} rel="stylesheet" href="{href}" />'

Expand All @@ -63,7 +63,7 @@ def stylesheet_preload(href: str, attrs: Optional[Dict[str, str]] = None) -> Tag
str -- CSS link tag.
"""

attrs_str = attrs_to_str(attrs)
attrs_str = attrs_to_str(attrs if attrs else {})

return f'<link {attrs_str} rel="preload" href="{href}" as="style" />'

Expand Down

0 comments on commit cd75bac

Please sign in to comment.