@elementor/editor-components 4.2.0-936 → 4.2.0-938

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/dist/index.js CHANGED
@@ -2571,10 +2571,12 @@ async function getComponentIds(elements, cache, isRecursive) {
2571
2571
  if (!cache.has(componentId)) {
2572
2572
  cache.set(componentId, getComponentDocumentData(componentId));
2573
2573
  }
2574
- const doc = await cache.get(componentId);
2575
- childElements = doc?.elements;
2574
+ if (isRecursive) {
2575
+ const doc = await cache.get(componentId);
2576
+ childElements = doc?.elements;
2577
+ }
2576
2578
  }
2577
- if (isRecursive && childElements?.length) {
2579
+ if (childElements?.length) {
2578
2580
  const childIds = await getComponentIds(childElements, cache, isRecursive);
2579
2581
  ids.push(...childIds);
2580
2582
  }