fix(medusa): has-changes (#4023)

* fix(medusa): has-changes

* add changeset
This commit is contained in:
Derek Wene authored and GitHub committed 2023-05-05 11:05:20 +02:00
1 parent afd79c9c39
commit bd53adb238
2 files changed
+9 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(variant-update): hasChanges function incorrectly calculates if there are changes
+4 -1
View File
@@ -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) {