mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #14472] [MERGED] fix: Chat page fails to load on undefined message #23478
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14472
Author: @Davixk
Created: 5/29/2025
Status: ✅ Merged
Merged: 5/29/2025
Merged by: @tjbck
Base:
dev← Head:fix/chat-loading-error📝 Commits (1)
01eedd3Handles undefined message case in message list creation📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
src/lib/utils/index.ts(+3 -0)📄 Description
Fixes an edge case where a malformed Chat history Message causes the Chat page load to fail.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Fixed
Additional Information
In some specific cirumstances, when messages or chat history is malformed, the retrieved
messageobject can beundefined.When this happens, the current code just returns it as
[message].This then causes an error when executing line 121 from /src/routes/s/[id]/+page.svelte:
because this line is trying to access an attribute that might not be available.
I have not looked into why the
messageobject can beundefinedthough. That would be worth looking into.Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.