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 GitHub
parent d7d46e431b
commit 51ca89bc5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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