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

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