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.
Files changed (2) hide show
  1. package/dist/index.js +21 -3
  2. 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
- const a = typeof v === "object" ? v : JSON.parse(v);
39918
- const b = typeof obj2[k] === "object" ? obj2[k] : JSON.parse(obj2[k]);
39919
- same = compare(a, b);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zakeke-configurator-react",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/declarations/composer/Module/src/index.d.ts",