Skip to content

Commit

Permalink
make sure emit EventCast after cast fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuyz0112 committed Jan 18, 2022
1 parent fb8ea8e commit c788ba6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/rrweb/src/replay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ export class Replayer {
finish();
}
}

this.emitter.emit(ReplayerEvents.EventCast, event);
};
return wrappedCastFn;
}
Expand Down
2 changes: 0 additions & 2 deletions packages/rrweb/src/replay/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ export function createPlayerService(
actions.push({
doAction: () => {
castFn();
emitter.emit(ReplayerEvents.EventCast, event);
},
delay: event.delay!,
});
Expand Down Expand Up @@ -269,7 +268,6 @@ export function createPlayerService(
timer.addAction({
doAction: () => {
castFn();
emitter.emit(ReplayerEvents.EventCast, event);
},
delay: event.delay!,
});
Expand Down

0 comments on commit c788ba6

Please sign in to comment.