@anfenn/zync 0.3.3 → 0.3.4

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/README.md +2 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -204,8 +204,8 @@ async function add(item: any): Promise<any | undefined> {
204
204
  throw new Error(error.message);
205
205
  }
206
206
 
207
- if (data && data.length > 0) {
208
- // Must return server id, and any other fields you want merged in
207
+ if (data?.length > 0) {
208
+ // Return server id if not using client assigned id's, and any other fields you want merged in
209
209
  return { id: data[0].id };
210
210
  }
211
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anfenn/zync",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "private": false,
5
5
  "description": "Sync middleware for Zustand",
6
6
  "keywords": [],