@mastra/rag 2.6.1 → 2.6.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ name: mastra-rag
3
3
  description: Documentation for @mastra/rag. Use when working with @mastra/rag APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/rag"
6
- version: "2.6.1"
6
+ version: "2.6.2-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.6.1",
2
+ "version": "2.6.2-alpha.0",
3
3
  "package": "@mastra/rag",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -4018,8 +4018,8 @@ function splitTextWithRegex(text, separator, separatorPosition) {
4018
4018
  if (splits[0]) result.push(splits[0]);
4019
4019
  for (let i = 1; i < splits.length - 1; i += 2) {
4020
4020
  const separator2 = splits[i];
4021
- const text2 = splits[i + 1];
4022
- if (separator2 && text2) result.push(separator2 + text2);
4021
+ const text2 = splits[i + 1] ?? "";
4022
+ if (separator2) result.push(separator2 + text2);
4023
4023
  }
4024
4024
  }
4025
4025
  return result.filter((s) => s !== "");