Skip to content

Commit

Permalink
Merge pull request #46 from kepstin/missing-type
Browse files Browse the repository at this point in the history
Ignore tldraw add shape with missing type field.
  • Loading branch information
kepstin authored Oct 3, 2023
2 parents 5170709 + 6347016 commit ef37918
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bbb_presentation_video/renderer/tldraw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ def add_shape_event(self, event: tldraw.AddShapeEvent) -> None:
shape.update_from_data(data)
action = "updated"
else:
shape = parse_shape_from_data(data)
self.shapes[presentation][slide][id] = shape
action = "added"
if "type" in data:
shape = parse_shape_from_data(data)
self.shapes[presentation][slide][id] = shape
action = "added"
else:
print(f'\tTldraw: Got add for shape: {id} with missing "type" field')
return

try:
del self.shape_patterns[id]
Expand Down

0 comments on commit ef37918

Please sign in to comment.