@timardex/cluemart-shared 1.3.89 → 1.3.90

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.
@@ -629,13 +629,15 @@ var vendroMenuSchema = yup3.object().shape({
629
629
  price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
630
630
  return value !== null && value !== void 0;
631
631
  }),
632
- productGroups: yup3.array().of(yup3.string().defined()).nullable().defined().test(
632
+ productGroups: yup3.array().of(yup3.string().defined()).transform(
633
+ (value, originalValue) => originalValue === void 0 ? null : value
634
+ ).nullable().test(
633
635
  "productGroups-required",
634
636
  "Product groups are required",
635
637
  function(value) {
636
- return value !== null && value !== void 0 && Array.isArray(value) && value.length > 0;
638
+ return value !== null && Array.isArray(value) && value.length > 0;
637
639
  }
638
- )
640
+ ).defined()
639
641
  });
640
642
  var vendorSchema = globalResourceSchema.shape({
641
643
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),