clarity-pattern-parser 10.1.25 → 10.1.26

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.
@@ -1198,7 +1198,7 @@
1198
1198
  }
1199
1199
  }
1200
1200
  if (this._trimDivider && this._hasDivider) {
1201
- const isDividerLastMatch = this.children.length > 1 && nodes[nodes.length - 1].name === this.children[1].name;
1201
+ const isDividerLastMatch = this.children.length > 1 && nodes.length > 1 && nodes[nodes.length - 1].name === this.children[1].name;
1202
1202
  if (isDividerLastMatch) {
1203
1203
  const node = nodes.pop();
1204
1204
  cursor.moveTo(node.firstIndex);