Skip to content

Commit

Permalink
fix: only append link with page attribute if metatada.page is available
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikstdl authored Sep 23, 2024
1 parent 8eb8226 commit f69956b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/chat/Messages/CitationsModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a
class="hover:text-gray-500 hover:dark:text-gray-100 underline"
href={document?.metadata?.file_id
? `/api/v1/files/${document?.metadata?.file_id}/content#page=${document?.metadata?.page + 1}`
? `/api/v1/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}`
: document.source.name.includes('http')
? document.source.name
: `#`}
Expand Down

0 comments on commit f69956b

Please sign in to comment.