unstructured
b814ece3 - fix: properly handle the case when an element's text is None (#3995)

Commit
260 days ago
fix: properly handle the case when an element's text is None (#3995) Some elements, like `Image`, can have `None` as its `text` attribute's value. In that case current chunking logic fails because it expects the field to always have a length or can be split. The fix is to update the logic as `element.text or ""` for checking length and add flow control to early exit to avoid calling split on `None`.
Author
Parents
Loading