@elementor/editor-variables 4.1.0-812 → 4.1.0-814

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
@@ -3912,12 +3912,20 @@ function getServiceActions(svc) {
3912
3912
  if (!type || !label || !value) {
3913
3913
  throw new Error("Create requires type, label, and value");
3914
3914
  }
3915
+ const labelError = validateLabel(label);
3916
+ if (labelError) {
3917
+ throw new Error(labelError);
3918
+ }
3915
3919
  return svc.create({ type, label, value });
3916
3920
  },
3917
3921
  update({ id: id2, label, value }) {
3918
3922
  if (!id2 || !label || !value) {
3919
3923
  throw new Error("Update requires id, label, and value");
3920
3924
  }
3925
+ const labelError = validateLabel(label);
3926
+ if (labelError) {
3927
+ throw new Error(labelError);
3928
+ }
3921
3929
  return svc.update(id2, { label, value });
3922
3930
  },
3923
3931
  delete({ id: id2 }) {