mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-24 00:22:25 +02:00
fix(sdk-js): handle threadId: undefined as controlled
This commit is contained in:
@@ -366,11 +366,11 @@ const useControllableThreadId = (options?: {
|
||||
onThreadIdRef.current?.(threadId);
|
||||
}, []);
|
||||
|
||||
if (typeof options?.threadId === "undefined") {
|
||||
if (!options || !("threadId" in options)) {
|
||||
return [localThreadId, onThreadId];
|
||||
}
|
||||
|
||||
return [options.threadId, onThreadId];
|
||||
return [options.threadId ?? null, onThreadId];
|
||||
};
|
||||
|
||||
type BagTemplate = {
|
||||
|
||||
Reference in New Issue
Block a user