Skip to content

Commit

Permalink
fix(merge_consecutive_keyboard_events): Fix reference before assignme…
Browse files Browse the repository at this point in the history
…nt (#411)

Co-authored-by: Seyed Morteza Hosseini <[email protected]>
  • Loading branch information
mory91 and Seyed Morteza Hosseini authored Jul 20, 2023
1 parent 6a42eb7 commit e136b28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openadapt/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ def get_merged_events(to_merge, state):
# TODO: consolidate pattern with merge_consecutive_mouse_move_events
if len(children) == 1:
# TODO: test
event = children[0]
event.timestamp -= state["dt"]
merged_event = children[0]
merged_event.timestamp -= state["dt"]
else:
first_child = children[0]
last_child = children[-1]
Expand Down

0 comments on commit e136b28

Please sign in to comment.