@elementor/editor-elements 4.5.0-1211 → 4.5.0-1213

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
@@ -266,8 +266,7 @@ function bindSettingsReconcile({ model, elementConfig }) {
266
266
  };
267
267
  }
268
268
  function attachChildFromRule(parentId, rule, stash) {
269
- const parent = getContainer(parentId) ?? void 0;
270
- const currentChildren = getDirectChildData(parent);
269
+ const currentChildren = getDirectChildData(parentId);
271
270
  const alreadyPresent = currentChildren.some((child) => child.elType === rule.child_type);
272
271
  if (alreadyPresent) {
273
272
  placeAnchoredChild(parentId, rule);
@@ -340,8 +339,9 @@ function requestNavigatorRefresh(parentId) {
340
339
  })
341
340
  );
342
341
  }
343
- function getDirectChildData(parent) {
344
- return (parent?.children ?? []).map((child) => child.model.toJSON());
342
+ function getDirectChildData(parentId) {
343
+ const elements = findModelInDocument(parentId)?.get("elements");
344
+ return (elements?.models ?? []).map((model) => ({ elType: model.get("elType") }));
345
345
  }
346
346
 
347
347
  // src/children-dependencies/reconcile-initial-children.ts