Skip to content

Commit 1efaa85

Browse files
committed
fix(server): skip drained terminal events when clearing scrollback
1 parent bedd3b1 commit 1efaa85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/server/src/terminal/Manager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3383,7 +3383,7 @@ export const makeWithOptions = Effect.fn("TerminalManager.makeWithOptions")(func
33833383
// Scrollback clearing must preserve lifecycle events and the active drain owner.
33843384
session.pendingProcessEvents = session.pendingProcessEvents
33853385
.slice(session.pendingProcessEventIndex)
3386-
.filter((event) => event.type === "exit");
3386+
.filter((event) => event?.type === "exit");
33873387
session.pendingProcessEventIndex = 0;
33883388
const eventStamp = advanceEventSequence(session);
33893389
yield* persistHistory(input.threadId, terminalId, session.history);

0 commit comments

Comments
 (0)