Skip to content

Commit

Permalink
fix(checkpoint): don't throw in MemorySaver.list if thread not found (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincburns authored Oct 17, 2024
1 parent c47436e commit d05f3a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/checkpoint/src/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ export class MemorySaver extends BaseCheckpointSaver {
const configCheckpointNamespace = config.configurable?.checkpoint_ns;

for (const threadId of threadIds) {
for (const checkpointNamespace of Object.keys(this.storage[threadId])) {
for (const checkpointNamespace of Object.keys(
this.storage[threadId] ?? {}
)) {
if (
configCheckpointNamespace !== undefined &&
checkpointNamespace !== configCheckpointNamespace
Expand Down

0 comments on commit d05f3a0

Please sign in to comment.