clarity-pattern-parser 11.0.5 → 11.0.6

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.
package/dist/index.js CHANGED
@@ -3002,7 +3002,7 @@ class ExpressionPattern {
3002
3002
  _isAtom(pattern) {
3003
3003
  pattern = this._unwrapAssociationIfNecessary(pattern);
3004
3004
  const firstChild = pattern.children[0];
3005
- const lastChild = pattern.children[1];
3005
+ const lastChild = pattern.children[pattern.children.length - 1];
3006
3006
  const firstChildIsReference = this._isRecursiveReference(firstChild);
3007
3007
  const lastChildIsReference = this._isRecursiveReference(lastChild);
3008
3008
  return !firstChildIsReference && !lastChildIsReference;