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 committed Oct 14, 2024
1 parent d3c8204 commit 997f230
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 997f230

Please sign in to comment.