Skip to content

Commit de22136

Browse files
committed
Make sure we're not overriding writer for subgraphs
1 parent 2675c46 commit de22136

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/langgraph/src/pregel/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,7 @@ export class Pregel<
20252025
}
20262026
}
20272027

2028-
config.writer = (chunk: unknown) => {
2028+
config.writer ??= (chunk: unknown) => {
20292029
if (!streamMode.includes("custom")) return;
20302030
const ns = (
20312031
getConfig()?.configurable?.[CONFIG_KEY_CHECKPOINT_NS] as
@@ -2038,7 +2038,7 @@ export class Pregel<
20382038
stream.push([ns ?? [], "custom", chunk]);
20392039
};
20402040

2041-
config.interrupt =
2041+
config.interrupt ??=
20422042
this.checkpointer != null
20432043
? interrupt
20442044
: () => {

0 commit comments

Comments
 (0)