@elementor/editor-components 4.2.0-937 → 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.mjs CHANGED
@@ -2514,10 +2514,12 @@ async function getComponentIds(elements, cache, isRecursive) {
2514
2514
  if (!cache.has(componentId)) {
2515
2515
  cache.set(componentId, getComponentDocumentData(componentId));
2516
2516
  }
2517
- const doc = await cache.get(componentId);
2518
- childElements = doc?.elements;
2517
+ if (isRecursive) {
2518
+ const doc = await cache.get(componentId);
2519
+ childElements = doc?.elements;
2520
+ }
2519
2521
  }
2520
- if (isRecursive && childElements?.length) {
2522
+ if (childElements?.length) {
2521
2523
  const childIds = await getComponentIds(childElements, cache, isRecursive);
2522
2524
  ids.push(...childIds);
2523
2525
  }