Skip to content

Commit

Permalink
fix(core): don’t record recordOutput as command
Browse files Browse the repository at this point in the history
  • Loading branch information
blakebyrnes committed Mar 23, 2022
1 parent a111a9e commit e7145d9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion client/lib/CoreCommandQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ export default class CoreCommandQueue {
this.internalState.commandsToRecord.push({
...command,
startDate: new Date(),
commandId: command?.commandId ?? this.nextCommandId,
});
if (this.internalState.commandsToRecord.length > 1000) {
this.flush().catch(() => null);
Expand Down
3 changes: 1 addition & 2 deletions core/lib/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export default class Session
this.getHeroMeta,
this.addRemoteEventListener,
this.removeRemoteEventListener,
this.recordOutput,
this.pauseCommands,
this.resumeCommands,
]);
Expand All @@ -260,7 +259,7 @@ export default class Session
}

public isAllowedCommand(method: string): boolean {
return this.commandRecorder.fnNames.has(method);
return this.commandRecorder.fnNames.has(method) || method === 'recordOutput';
}

public shouldWaitForCommandLock(method: keyof Session): boolean {
Expand Down
2 changes: 1 addition & 1 deletion timetravel/lib/MirrorPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default class MirrorPage extends TypedEventEmitter<{
this.subscribeToTab = null;
this.domRecording = null;
this.isReady = null;
// @ts-expect-error
// @ts-ignore
this.loadQueue.reset();
});
this.subscribeToTab = tab;
Expand Down

0 comments on commit e7145d9

Please sign in to comment.