mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-11-09 06:57:26 +00:00
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`.