Skip to content

Commit

Permalink
fix(medusa): Fix typo in discounts error message (#5853)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajarin-M authored Jan 7, 2024
1 parent 46d610b commit 6b0b3fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-rules-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---

Fix typo in discounts error message
2 changes: 1 addition & 1 deletion packages/medusa/src/services/__tests__/discount.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down
2 changes: 1 addition & 1 deletion packages/medusa/src/services/discount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
}

Expand Down

0 comments on commit 6b0b3fe

Please sign in to comment.