Skip to content

Commit 018871f

Browse files
authored
fix(medusa): priced products region_id regression (#13961)
* Correctly destructure query result * Add changeset
1 parent 32f9c15 commit 018871f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/few-shoes-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/medusa": patch
3+
---
4+
5+
Fix regression preventing region_id to be resolved from store's default region when retrieving priced products

packages/medusa/src/api/utils/middlewares/products/normalize-data-for-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function normalizeDataForContext(options: PricingContextOptions = {}) {
7777

7878
// Finally, try to get it from the store defaults if not available
7979
if (!regionId) {
80-
const stores = await refetchEntities({
80+
const { data: stores } = await refetchEntities({
8181
entity: "store",
8282
scope: req.scope,
8383
fields: ["id", "default_region_id"],

0 commit comments

Comments
 (0)