zakeke-configurator-react 0.0.77 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39892,6 +39892,21 @@ function compare(_obj1, _obj2) {
|
|
|
39892
39892
|
}
|
|
39893
39893
|
let obj1 = copy(_obj1);
|
|
39894
39894
|
let obj2 = copy(_obj2);
|
|
39895
|
+
// Special DIS case, where the code is a object with id and other parameters.
|
|
39896
|
+
// We need to expand it
|
|
39897
|
+
try {
|
|
39898
|
+
const idJson1 = JSON.parse(obj1.id);
|
|
39899
|
+
if (idJson1.id) {
|
|
39900
|
+
obj1 = idJson1;
|
|
39901
|
+
}
|
|
39902
|
+
console.log("Code is a valid json with Id for obj1, use json instead", obj1, obj2);
|
|
39903
|
+
const idJson2 = JSON.parse(obj2.id);
|
|
39904
|
+
if (idJson2.id) {
|
|
39905
|
+
obj2 = idJson2;
|
|
39906
|
+
}
|
|
39907
|
+
console.log("Code is a valid json with Id for obj2, use json instead", obj1, obj2);
|
|
39908
|
+
}
|
|
39909
|
+
catch (ex) { }
|
|
39895
39910
|
// Remove dummy property
|
|
39896
39911
|
delete obj1.zakekePlatform;
|
|
39897
39912
|
delete obj2.zakekePlatform;
|
|
@@ -39914,9 +39929,12 @@ function compare(_obj1, _obj2) {
|
|
|
39914
39929
|
same = compare(v, obj2[k]);
|
|
39915
39930
|
}
|
|
39916
39931
|
if (isValidJSON(v) || isValidJSON(obj2[k])) {
|
|
39917
|
-
|
|
39918
|
-
|
|
39919
|
-
|
|
39932
|
+
try {
|
|
39933
|
+
const a = typeof v === "object" ? v : JSON.parse(v);
|
|
39934
|
+
const b = typeof obj2[k] === "object" ? obj2[k] : JSON.parse(obj2[k]);
|
|
39935
|
+
same = compare(a, b);
|
|
39936
|
+
}
|
|
39937
|
+
catch (_a) { }
|
|
39920
39938
|
}
|
|
39921
39939
|
if (!same)
|
|
39922
39940
|
break;
|