fix: handle undefined from eventQueue.shift() in SDK engine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e0185743ec
commit
8b92abcce9
|
|
@ -174,7 +174,7 @@ export class ClaudeAgentSdkEngine implements AgentEnginePort {
|
|||
|
||||
while (eventQueue.length > 0) {
|
||||
const event = eventQueue.shift();
|
||||
if (event === null) return;
|
||||
if (event === null || event === undefined) return;
|
||||
yield event;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue