@elementor/editor-variables 3.35.0-349 → 3.35.0-350

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
@@ -3825,7 +3825,15 @@ function init() {
3825
3825
  registerRepeaterInjections();
3826
3826
  registerControlReplacement({
3827
3827
  component: VariableControl,
3828
- condition: ({ value, placeholder }) => hasVariable(value) || hasVariable(placeholder)
3828
+ condition: ({ value, placeholder }) => {
3829
+ if (hasVariableAssigned(value)) {
3830
+ return true;
3831
+ }
3832
+ if (value) {
3833
+ return false;
3834
+ }
3835
+ return hasVariableAssigned(placeholder);
3836
+ }
3829
3837
  });
3830
3838
  registerPopoverAction({
3831
3839
  id: "variables",
@@ -3840,7 +3848,7 @@ function init() {
3840
3848
  });
3841
3849
  registerPanel(panel);
3842
3850
  }
3843
- function hasVariable(value) {
3851
+ function hasVariableAssigned(value) {
3844
3852
  if (isTransformable2(value)) {
3845
3853
  return hasVariableType(value.$$type);
3846
3854
  }