fix(medusa): has-changes (#4023)
* fix(medusa): has-changes * add changeset
This commit is contained in:
5
.changeset/loud-ways-fry.md
Normal file
5
.changeset/loud-ways-fry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(variant-update): hasChanges function incorrectly calculates if there are changes
|
||||
@@ -11,7 +11,10 @@ export function hasChanges<T1 extends Object, T2 extends Object>(
|
||||
): boolean {
|
||||
for (const [key, value] of Object.entries(obj2)) {
|
||||
if (isObject(obj1[key])) {
|
||||
return hasChanges(obj1[key], value)
|
||||
if (hasChanges(obj1[key], value)) {
|
||||
return true
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
if (obj1[key] !== value) {
|
||||
|
||||
Reference in New Issue
Block a user