mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Merge branch 'main' of https://github.com/use-the-fork/Flowise into Bug/rework-redis-connection
# Conflicts: # packages/components/package.json # packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx # packages/ui/src/views/apikey/index.jsx # packages/ui/src/views/assistants/AssistantDialog.jsx # packages/ui/src/views/chatflows/index.jsx # packages/ui/src/views/credentials/index.jsx
This commit is contained in:
@@ -423,10 +423,14 @@ export const removeDuplicateURL = (message) => {
|
||||
if (!message.sourceDocuments) return newSourceDocuments
|
||||
|
||||
message.sourceDocuments.forEach((source) => {
|
||||
if (isValidURL(source.metadata.source) && !visitedURLs.includes(source.metadata.source)) {
|
||||
visitedURLs.push(source.metadata.source)
|
||||
newSourceDocuments.push(source)
|
||||
} else if (!isValidURL(source.metadata.source)) {
|
||||
if (source.metadata && source.metadata.source) {
|
||||
if (isValidURL(source.metadata.source) && !visitedURLs.includes(source.metadata.source)) {
|
||||
visitedURLs.push(source.metadata.source)
|
||||
newSourceDocuments.push(source)
|
||||
} else if (!isValidURL(source.metadata.source)) {
|
||||
newSourceDocuments.push(source)
|
||||
}
|
||||
} else {
|
||||
newSourceDocuments.push(source)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user