allow for 'go.Figure | None' annotation in State (#4426)

This commit is contained in:
Thomas Brandého 2024-11-25 10:45:29 -08:00 committed by Masen Furer
parent b41b1f364a
commit 7129bfb513
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -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