mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
fix(stream): skip non-object envelopes in onResumeStreamReplay
Matches the existing guard in clearResumeFence. A malformed entry from the server (version skew, serialization mishap) would otherwise throw on `envelope._replayed = true` mid-iteration and leave the fence half-flushed via the finally-block.
This commit is contained in:
parent
4cc28eabff
commit
1eae0f793a
1 changed files with 1 additions and 0 deletions
|
|
@ -721,6 +721,7 @@
|
|||
const envelopes = Array.isArray(payload?.envelopes) ? payload.envelopes : [];
|
||||
try {
|
||||
for (const envelope of envelopes) {
|
||||
if (!envelope || typeof envelope !== 'object') continue;
|
||||
envelope._replayed = true;
|
||||
await chatEventHandler(envelope);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue