Skip to content

Commit 286a84e

Browse files
authored
fix suppressHydrationWarning being set to "true" instead of true (#5733)
1 parent fe9551d commit 286a84e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

reflex/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,9 +1311,9 @@ def memoized_toast_provider():
13111311
self.head_components,
13121312
html_lang=self.html_lang,
13131313
html_custom_attrs=(
1314-
{"suppressHydrationWarning": "true", **self.html_custom_attrs}
1314+
{"suppressHydrationWarning": True, **self.html_custom_attrs}
13151315
if self.html_custom_attrs
1316-
else {"suppressHydrationWarning": "true"}
1316+
else {"suppressHydrationWarning": True}
13171317
),
13181318
)
13191319
)

reflex/compiler/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from collections.abc import Callable, Iterable, Sequence
77
from inspect import getmodule
88
from pathlib import Path
9-
from typing import TYPE_CHECKING
9+
from typing import TYPE_CHECKING, Any
1010

1111
from reflex import constants
1212
from reflex.compiler import templates, utils
@@ -465,7 +465,7 @@ def get_shared_components_recursive(component: BaseComponent):
465465
def compile_document_root(
466466
head_components: list[Component],
467467
html_lang: str | None = None,
468-
html_custom_attrs: dict[str, Var | str] | None = None,
468+
html_custom_attrs: dict[str, Var | Any] | None = None,
469469
) -> tuple[str, str]:
470470
"""Compile the document root.
471471

reflex/compiler/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def compile_custom_component(
350350
def create_document_root(
351351
head_components: Sequence[Component] | None = None,
352352
html_lang: str | None = None,
353-
html_custom_attrs: dict[str, Var | str] | None = None,
353+
html_custom_attrs: dict[str, Var | Any] | None = None,
354354
) -> Component:
355355
"""Create the document root.
356356

0 commit comments

Comments
 (0)