mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #14946] [MERGED] fix: Page number 1 not displaying in citation references #10453
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/14946
Author: @t-rekttt
Created: 6/12/2025
Status: ✅ Merged
Merged: 6/13/2025
Merged by: @tjbck
Base:
dev← Head:patch-1📝 Commits (1)
190400dFix: page number edge case📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/lib/components/chat/Messages/CitationsModal.svelte(+1 -1)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
{document.metadata.page + 1}. But its container have a condition{#if Number.isInteger(document?.metadata?.page)}. When thedocument?.metadata?.page == 0(page 1), the page number will not be displayed. This change aims to fix the issue.Changed
src/lib/components/chat/Messages/CitationsModal.svelteto use{#if Number.isInteger(document?.metadata?.page)}to check if the page number existFixed
Screenshots or Videos
Before:

After:

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.