hotfix(medusa): null check

This commit is contained in:
Sebastian Rindom
2021-08-09 16:34:12 +02:00
parent 8275b1623e
commit 3d65ed9b78

View File

@@ -36,7 +36,7 @@ class InventoryService extends BaseService {
*/
async adjustInventory(variantId, adjustment) {
//if variantId is undefined ergo. a custom item then do nothing
if (typeof variantId === "undefined") {
if (typeof variantId === "undefined" || variantId === null) {
return
}
@@ -63,7 +63,7 @@ class InventoryService extends BaseService {
async confirmInventory(variantId, quantity) {
//if variantId is undefined then confirm inventory as it
//is a custom item that is not managed
if (typeof variantId === "undefined") {
if (typeof variantId === "undefined" || variantId === null) {
return true
}