Skip to content

Commit 49b53a6

Browse files
committed
refine camel to dash conversion
1 parent 8a00c65 commit 49b53a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/idom/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ def _vdom_attr_to_html_str(key: str, value: Any) -> tuple[str, str]:
312312
elif key.startswith("data") or key.startswith("aria"):
313313
# Handle data-* attribute names
314314
key = _CAMEL_CASE_SUB_PATTERN.sub("-", key)
315-
else:
316-
key = _CAMEL_TO_DASH_CASE_HTML_ATTRS.get(key, key)
315+
elif key in _CAMEL_TO_DASH_CASE_HTML_ATTRS:
316+
key = _CAMEL_TO_DASH_CASE_HTML_ATTRS[key]
317317

318318
assert not callable(
319319
value

0 commit comments

Comments
 (0)