@plait/core 0.78.0 → 0.78.1

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.
@@ -508,7 +508,7 @@ const PlaitNode = {
508
508
  if (!n.children || !board.isExpanded(n)) {
509
509
  return n;
510
510
  }
511
- while (n) {
511
+ while (n && n.children && n.children.length > 0 && board.isExpanded(n)) {
512
512
  if (n.children.length === 0) {
513
513
  break;
514
514
  }