mam 1.11.501 → 1.11.503

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/node.test.js CHANGED
@@ -11828,9 +11828,14 @@ var $;
11828
11828
  return $mol_dev_format_span({}, $mol_dev_format_native(this));
11829
11829
  }
11830
11830
  *view_find(check, path = []) {
11831
- if (check(this))
11831
+ if (path.length === 0 && check(this))
11832
11832
  return yield [...path, this];
11833
11833
  try {
11834
+ for (const item of this.sub()) {
11835
+ if (item instanceof $mol_view && check(item)) {
11836
+ return yield [...path, item];
11837
+ }
11838
+ }
11834
11839
  for (const item of this.sub()) {
11835
11840
  if (item instanceof $mol_view) {
11836
11841
  yield* item.view_find(check, [...path, this]);