Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fix Cannot read properties of undefined (reading 'replace') #1127

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

chz8494
Copy link
Contributor

@chz8494 chz8494 commented Oct 24, 2023

undefined document pagecontent is causing reading issue with replace function.
fix for:
#1106 #1123

@chz8494 chz8494 changed the title fix Cannot read properties of undefined (reading 'replace') [Bug] Fix Cannot read properties of undefined (reading 'replace') Oct 24, 2023
@chz8494
Copy link
Contributor Author

chz8494 commented Oct 25, 2023

@HenryHengZJ

@HenryHengZJ
Copy link
Contributor

thanks for the suggested fix! Can you let me know how to replicate the issue? I've been trying to use the Conversational Retrieval QA Chain template, but mine works everytime

@chz8494
Copy link
Contributor Author

chz8494 commented Oct 25, 2023

For example, if you have an empty confluence page, the document results will end up with undefined pagecontent and some metadata. Also if you drag a confluence loader as document input then replace it with other loader, it also end up with undefined pagecontent with a confluence element in the document array.

@HenryHengZJ
Copy link
Contributor

@chz8494 do you have any other examples? I was not able to have Confluence setup correctly

@chz8494
Copy link
Contributor Author

chz8494 commented Oct 27, 2023

I’ll change that in my PR. My actual fix was supposed to be just "if (flattenDocs[i].pageContent !== undefined)" but had put it only flattenDocs[i] accidentally.

Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @chz8494 !

@HenryHengZJ HenryHengZJ merged commit 0655241 into FlowiseAI:main Oct 29, 2023
2 checks passed
hemati pushed a commit to hemati/Flowise that referenced this pull request Dec 27, 2023
[Bug] Fix Cannot read properties of undefined (reading 'replace')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants