[PR #1145] [MERGED] Fix Cannot read properties of undefined (reading 'length') #3604

Closed
opened 2026-02-22 18:34:07 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1145
Author: @sykuang
Created: 4/20/2024
Status: Merged
Merged: 4/20/2024
Merged by: @timothycarambat

Base: masterHead: Fix-Upload-Failed


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 collector/processSingleFile/convert/asPDF.js (+1 -1)

📄 Description

Pull Request Type

  • feat
  • [ X] 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #xxx

What is in this change?

Fix TypeError: Cannot read properties of undefined (reading 'length').
Disregard the action of pushing the page content if the value of doc.pageContent is 'undefined'.

Additional Information

The original error message is as below

node:internal/modules/cjs/loader:1137
    at async /app/collector/index.js:41:11
    at async processSingleFile  (/app/collector/processSingleFile/index.js:69:10)
    at asPDF (/app/collector/processSingleFile/convert/asPDF.js:25:26)
TypeError: Cannot read properties of undefined (reading 'length')

Developer Validations

  • [ x] I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • [ x] I have tested my code functionality
  • [ x] Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/1145 **Author:** [@sykuang](https://github.com/sykuang) **Created:** 4/20/2024 **Status:** ✅ Merged **Merged:** 4/20/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `Fix-Upload-Failed` --- ### 📝 Commits (1) - [`0471625`](https://github.com/Mintplex-Labs/anything-llm/commit/04716259ed142eb4e81085a186a032c552ea5ba7) Fix upload failed ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `collector/processSingleFile/convert/asPDF.js` (+1 -1) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ X] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #xxx ### What is in this change? Fix TypeError: Cannot read properties of undefined (reading 'length'). Disregard the action of pushing the page content if the value of doc.pageContent is 'undefined'. ### Additional Information The original error message is as below ``` node:internal/modules/cjs/loader:1137 at async /app/collector/index.js:41:11 at async processSingleFile (/app/collector/processSingleFile/index.js:69:10) at asPDF (/app/collector/processSingleFile/convert/asPDF.js:25:26) TypeError: Cannot read properties of undefined (reading 'length') ``` ### Developer Validations <!-- All of the applicable items should be checked. --> - [ x] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [ x] I have tested my code functionality - [ x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:07 -05:00
yindo closed this issue 2026-02-22 18:34:07 -05:00
yindo changed title from [PR #1145] Fix Cannot read properties of undefined (reading 'length') to [PR #1145] [MERGED] Fix Cannot read properties of undefined (reading 'length') 2026-06-05 15:14:16 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3604