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:
@@ -79,7 +79,7 @@ const AddVariantModal = ({ open, onClose, product }: Props) => {
|
||||
delete data.stock.stock_location
|
||||
|
||||
onAddVariant(createAddPayload(data), (productRes) => {
|
||||
if (typeof stock_location !== "undefined") {
|
||||
if (stock_location?.length) {
|
||||
createStockLocationsForVariant(productRes, stock_location).then(() => {
|
||||
resetAndClose()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user