From 4fa41686f98a8bcfaabfb909a590f8c3280e24f8 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Sat, 23 Nov 2024 00:04:29 +0100 Subject: [PATCH] allow for 'go.Figure | None' annotation in State --- reflex/components/plotly/plotly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py index 1e551ce87..f07a743cb 100644 --- a/reflex/components/plotly/plotly.py +++ b/reflex/components/plotly/plotly.py @@ -255,7 +255,7 @@ const extractPoints = (points) => { def _render(self): tag = super()._render() - figure = self.data.to(dict) + figure = self.data.to(dict) if self.data is not None else {} merge_dicts = [] # Data will be merged and spread from these dict Vars if self.layout is not None: # Why is this not a literal dict? Great question... it didn't work