Skip to content

Commit f17ba96

Browse files
committed
prevent duplicate component registration fix reactive-python#5
1 parent a4d439c commit f17ba96

File tree

1 file changed

+2
-1
lines changed
  • src/django_idom/templatetags

1 file changed

+2
-1
lines changed

src/django_idom/templatetags/idom.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import functools
12
import json
2-
import sys
33
from importlib import import_module
44
from urllib.parse import urlencode
55
from uuid import uuid4
@@ -35,6 +35,7 @@ def idom_component(_component_id_, **kwargs):
3535
}
3636

3737

38+
@functools.cache
3839
def _register_component(full_component_name: str) -> None:
3940
module_name, component_name = full_component_name.rsplit(".", 1)
4041

0 commit comments

Comments
 (0)