diff --git a/.changeset/forty-rules-fix.md b/.changeset/forty-rules-fix.md new file mode 100644 index 0000000000000..be420056927fb --- /dev/null +++ b/.changeset/forty-rules-fix.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +Fix typo in discounts error message diff --git a/packages/medusa/src/services/__tests__/discount.js b/packages/medusa/src/services/__tests__/discount.js index 58ade91a5e7e5..107028d836f74 100644 --- a/packages/medusa/src/services/__tests__/discount.js +++ b/packages/medusa/src/services/__tests__/discount.js @@ -75,7 +75,7 @@ describe("DiscountService", () => { .catch((e) => e) expect(err.type).toEqual("invalid_data") - expect(err.message).toEqual("Discount must have atleast 1 region") + expect(err.message).toEqual("Discount must have at least 1 region") expect(discountRepository.create).toHaveBeenCalledTimes(0) }) diff --git a/packages/medusa/src/services/discount.ts b/packages/medusa/src/services/discount.ts index 5bc90eb67a481..039e6db3f1461 100644 --- a/packages/medusa/src/services/discount.ts +++ b/packages/medusa/src/services/discount.ts @@ -210,7 +210,7 @@ class DiscountService extends TransactionBaseService { if (!discount.regions?.length) { throw new MedusaError( MedusaError.Types.INVALID_DATA, - "Discount must have atleast 1 region" + "Discount must have at least 1 region" ) }