Skip to content

Commit 0990430

Browse files
committed
how about this
1 parent 3118402 commit 0990430

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

reflex/components/component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ def _get_dynamic_imports(self) -> str:
22642264
# https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-named-exports
22652265
f".then((mod) => mod.{self.tag})"
22662266
if not self.is_default
2267-
else ".then((mod) => mod.default)"
2267+
else ".then((mod) => typeof mod.default === 'function' ? mod.default : mod.default.default)"
22682268
)
22692269
return (
22702270
f"const {self.alias or self.tag} = ClientSide(() => "

reflex/components/plotly/plotly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def dynamic_plotly_import(name: str, package: str) -> str:
288288
The dynamic import for the plotly component.
289289
"""
290290
library_import = f"import('{package}')"
291-
mod_import = ".then((mod) => ({ default: createPlotlyComponent(mod) }))"
291+
mod_import = ".then((mod) => createPlotlyComponent(mod))"
292292
return f"""
293293
const {name} = ClientSide(() =>
294294
{library_import}{mod_import}

0 commit comments

Comments
 (0)