publ-echo-test 0.0.160 → 0.0.162

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.
@@ -115,15 +115,19 @@ export var findGroupBlocks = function (block, targetId) {
115
115
  return [];
116
116
  }
117
117
  var groupBlocks = targetBlock.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
118
- var bulkInTarget = groupBlocks.find(function (block) { return block.blockId === 'BULK'; });
119
- var groupInBulk = bulkInTarget === null || bulkInTarget === void 0 ? void 0 : bulkInTarget.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
118
+ var bulkInTarget = targetBlock.children.find(function (block) { return block.blockId === 'BULK'; });
119
+ if (bulkInTarget && bulkInTarget.type === 'GROUP_BLOCK') {
120
+ var groupInBulk = bulkInTarget.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
121
+ if (targetBlock.blockId === 'ROOT') {
122
+ return [targetBlock].concat(groupBlocks).concat(groupInBulk);
123
+ }
124
+ if (groupInBulk && groupInBulk.length > 0) {
125
+ return groupBlocks.concat(groupInBulk);
126
+ }
127
+ }
120
128
  if (targetBlock.blockId === 'ROOT') {
121
129
  return groupBlocks;
122
130
  }
123
- if (groupInBulk && groupInBulk.length > 0) {
124
- console.log('groupInBulk', groupInBulk);
125
- return [targetBlock].concat(groupBlocks).concat(groupInBulk);
126
- }
127
131
  return [targetBlock].concat(groupBlocks);
128
132
  };
129
133
  // export const findAllComponentBlockIds = (blockStructure: Block[]): number[] => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.160",
3
+ "version": "0.0.162",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",