publ-echo-test 0.0.100 → 0.0.101
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.
@@ -452,16 +452,16 @@ export var findAccessibleChildrenBlocks = function (blockStructure, targetGroupI
|
|
452
452
|
return [];
|
453
453
|
}
|
454
454
|
var result = new Set();
|
455
|
-
var traverse = function (block) {
|
455
|
+
var traverse = function (block, rootId) {
|
456
456
|
if ('children' in block && block.children) {
|
457
457
|
for (var _i = 0, _a = block.children; _i < _a.length; _i++) {
|
458
458
|
var child = _a[_i];
|
459
459
|
if (blockIds.includes(child.blockId)) {
|
460
|
-
result.add(
|
460
|
+
result.add(rootId);
|
461
461
|
return true; // Stop traversal for this branch
|
462
462
|
}
|
463
|
-
if (traverse(child)) {
|
464
|
-
result.add(
|
463
|
+
if (traverse(child, rootId)) {
|
464
|
+
result.add(rootId);
|
465
465
|
return true; // Stop traversal for this branch
|
466
466
|
}
|
467
467
|
}
|
@@ -474,7 +474,7 @@ export var findAccessibleChildrenBlocks = function (blockStructure, targetGroupI
|
|
474
474
|
result.add(child.blockId);
|
475
475
|
}
|
476
476
|
else {
|
477
|
-
traverse(child);
|
477
|
+
traverse(child, child.blockId);
|
478
478
|
}
|
479
479
|
}
|
480
480
|
return Array.from(result);
|