next-recomponents 1.4.9 → 1.5.0

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 CHANGED
@@ -32394,7 +32394,7 @@ function useResources({
32394
32394
  const options = {
32395
32395
  method: "POST",
32396
32396
  url: `${baseURI}/${key}`,
32397
- data: __spreadValues({}, data),
32397
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32398
32398
  headers: { Authorization: token }
32399
32399
  };
32400
32400
  const newInfo = __spreadValues({}, info);
@@ -32455,7 +32455,7 @@ function useResources({
32455
32455
  const options = {
32456
32456
  method: "PATCH",
32457
32457
  url: `${baseURI}/${key}/${id3}`,
32458
- data: __spreadValues({}, data),
32458
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32459
32459
  headers: { Authorization: token }
32460
32460
  };
32461
32461
  const newInfo = __spreadValues({}, info);
package/dist/index.mjs CHANGED
@@ -32384,7 +32384,7 @@ function useResources({
32384
32384
  const options = {
32385
32385
  method: "POST",
32386
32386
  url: `${baseURI}/${key}`,
32387
- data: __spreadValues({}, data),
32387
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32388
32388
  headers: { Authorization: token }
32389
32389
  };
32390
32390
  const newInfo = __spreadValues({}, info);
@@ -32445,7 +32445,7 @@ function useResources({
32445
32445
  const options = {
32446
32446
  method: "PATCH",
32447
32447
  url: `${baseURI}/${key}/${id3}`,
32448
- data: __spreadValues({}, data),
32448
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32449
32449
  headers: { Authorization: token }
32450
32450
  };
32451
32451
  const newInfo = __spreadValues({}, info);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -120,7 +120,7 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
120
120
  const options = {
121
121
  method: "POST",
122
122
  url: `${baseURI}/${key}`,
123
- data: { ...data },
123
+ data: Array.isArray(data) ? [...data] : { ...data },
124
124
  headers: { Authorization: token },
125
125
  };
126
126
  const newInfo = { ...info };
@@ -183,7 +183,7 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
183
183
  const options = {
184
184
  method: "PATCH",
185
185
  url: `${baseURI}/${key}/${id}`,
186
- data: { ...data },
186
+ data: Array.isArray(data) ? [...data] : { ...data },
187
187
  headers: { Authorization: token },
188
188
  };
189
189
  const newInfo = { ...info };