From cd75baccfcece376011c38e4230667d8ec4bf559 Mon Sep 17 00:00:00 2001 From: Kieran Gill Date: Thu, 1 Aug 2024 13:04:42 -0400 Subject: [PATCH] fix None attrs --- django_vite/core/tag_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django_vite/core/tag_generator.py b/django_vite/core/tag_generator.py index 34f2cd9..91c2291 100644 --- a/django_vite/core/tag_generator.py +++ b/django_vite/core/tag_generator.py @@ -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'' @@ -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''