@applicaster/zapp-react-native-bridge 15.0.0-rc.128 → 15.0.0-rc.129

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.
@@ -1,5 +1,6 @@
1
1
  import * as R from "ramda";
2
2
 
3
+ import { clone } from "@applicaster/zapp-react-native-utils/utils";
3
4
  import { localStorage } from "../ZappStorage/LocalStorage";
4
5
  import { subscriber } from "@applicaster/zapp-react-native-utils/functionUtils";
5
6
 
@@ -55,15 +56,13 @@ export async function setAsFavorite(item: Item) {
55
56
  throw new Error("Couldn't find favourites object");
56
57
  }
57
58
 
58
- const itemToAdd: Item = JSON.parse(JSON.stringify(item));
59
-
60
59
  if (itemExistInFavourites(favourites, item)) {
61
60
  throw new Error(
62
61
  `entry with id ${item?.id} is already in the favourites list`
63
62
  );
64
63
  }
65
64
 
66
- const newFavourites = R.append(itemToAdd, favourites);
65
+ const newFavourites = R.append(clone(item), favourites);
67
66
 
68
67
  try {
69
68
  await localStorage.setItem(key, newFavourites, namespace);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-bridge",
3
- "version": "15.0.0-rc.128",
3
+ "version": "15.0.0-rc.129",
4
4
  "description": "Applicaster Zapp React Native modules",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "homepage": "https://github.com/applicaster/quickbrick#readme",
33
33
  "dependencies": {
34
34
  "@applicaster/zapp-pipes-dev-kit": "1.4.7",
35
- "@applicaster/zapp-react-native-utils": "15.0.0-rc.128",
35
+ "@applicaster/zapp-react-native-utils": "15.0.0-rc.129",
36
36
  "md5": "^2.3.0",
37
37
  "uuid": "^3.3.2"
38
38
  },