publ-echo-test 0.0.132 → 0.0.134

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.
@@ -228,18 +228,18 @@ export var addBulkToTarget = function (block, targetId, bulkBlockIds) {
228
228
  targetBlock.children.push(bulkBlock);
229
229
  return blockCopy;
230
230
  };
231
- var findPath = function (block, id, path) {
231
+ var findWorkDirPath = function (block, id, path) {
232
232
  if (block.type === 'COMPONENT_BLOCK') {
233
233
  return null;
234
234
  }
235
235
  for (var _i = 0, _a = block.children; _i < _a.length; _i++) {
236
236
  var child = _a[_i];
237
- var currentPath = __spreadArray(__spreadArray([], path, true), [child.blockId], false);
237
+ var currentPath = child.type === 'COMPONENT_BLOCK' ? path : __spreadArray(__spreadArray([], path, true), [child.blockId], false);
238
238
  if (child.blockId === id) {
239
239
  return currentPath;
240
240
  }
241
241
  if ('children' in child && child.children) {
242
- var result = findPath(child, id, currentPath); // Pass the correct child block here
242
+ var result = findWorkDirPath(child, id, currentPath);
243
243
  if (result) {
244
244
  return result;
245
245
  }
@@ -248,7 +248,7 @@ var findPath = function (block, id, path) {
248
248
  return null;
249
249
  };
250
250
  export var getBlockWorkDirPath = function (block, blockId) {
251
- var path = findPath(block, blockId, ['/ROOT']);
251
+ var path = findWorkDirPath(block, blockId, ['/ROOT']);
252
252
  return path ? path.join('/') : null;
253
253
  };
254
254
  export function formatBlockIdToCbId(blockId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.132",
3
+ "version": "0.0.134",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",