@elementor/editor-variables 3.35.0-348 → 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.js CHANGED
@@ -3822,7 +3822,15 @@ function init() {
3822
3822
  registerRepeaterInjections();
3823
3823
  (0, import_editor_editing_panel8.registerControlReplacement)({
3824
3824
  component: VariableControl,
3825
- condition: ({ value, placeholder }) => hasVariable(value) || hasVariable(placeholder)
3825
+ condition: ({ value, placeholder }) => {
3826
+ if (hasVariableAssigned(value)) {
3827
+ return true;
3828
+ }
3829
+ if (value) {
3830
+ return false;
3831
+ }
3832
+ return hasVariableAssigned(placeholder);
3833
+ }
3826
3834
  });
3827
3835
  registerPopoverAction({
3828
3836
  id: "variables",
@@ -3837,7 +3845,7 @@ function init() {
3837
3845
  });
3838
3846
  (0, import_editor_panels2.__registerPanel)(panel);
3839
3847
  }
3840
- function hasVariable(value) {
3848
+ function hasVariableAssigned(value) {
3841
3849
  if ((0, import_editor_props7.isTransformable)(value)) {
3842
3850
  return hasVariableType(value.$$type);
3843
3851
  }