refac
This commit is contained in:
@@ -2397,6 +2397,7 @@ async def process_web(
|
||||
'status': True,
|
||||
'collection_name': collection_name,
|
||||
'filename': form_data.url,
|
||||
'content': content,
|
||||
'file': {
|
||||
'data': {
|
||||
'content': content,
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
$: if (citation) {
|
||||
expandedDocs = new Set();
|
||||
mergedDocuments = citation.document?.map((c, i) => {
|
||||
mergedDocuments = (citation.document ?? []).map((c, i) => {
|
||||
return {
|
||||
source: citation.source,
|
||||
document: c,
|
||||
@@ -223,7 +223,7 @@
|
||||
title={$i18n.t('Content')}
|
||||
></iframe>
|
||||
{:else}
|
||||
{@const rawContent = document.document.trim().replace(/\n\n+/g, '\n\n')}
|
||||
{@const rawContent = (document.document ?? '').trim().replace(/\n\n+/g, '\n\n')}
|
||||
{@const isTruncated =
|
||||
($settings?.renderMarkdownInPreviews ?? true) &&
|
||||
rawContent.length > CONTENT_PREVIEW_LIMIT &&
|
||||
|
||||
Reference in New Issue
Block a user