fix(admin-ui): Fix variant creation when no stock locations provided (#4843)
* Update check on variant creation, whether to create stock locations * Create spicy-shoes-type.md
This commit is contained in:
1 parent
57e199ef52
commit
f4bf9ee169
2 files changed
+7
-1
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/admin-ui": patch
|
||||||
|
"@medusajs/admin": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(admin-ui): Fix variant creation when no stock locations provided
|
||||||
+1
-1
@@ -79,7 +79,7 @@ const AddVariantModal = ({ open, onClose, product }: Props) => {
|
|||||||
delete data.stock.stock_location
|
delete data.stock.stock_location
|
||||||
|
|
||||||
onAddVariant(createAddPayload(data), (productRes) => {
|
onAddVariant(createAddPayload(data), (productRes) => {
|
||||||
if (typeof stock_location !== "undefined") {
|
if (stock_location?.length) {
|
||||||
createStockLocationsForVariant(productRes, stock_location).then(() => {
|
createStockLocationsForVariant(productRes, stock_location).then(() => {
|
||||||
resetAndClose()
|
resetAndClose()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user