next-recomponents 1.6.0 → 1.6.2

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
@@ -32428,10 +32428,11 @@ function useResources({
32428
32428
  }
32429
32429
  }
32430
32430
  }
32431
+ newInfo[key].data = newInfo[key].data.flat();
32431
32432
  } else {
32432
32433
  newInfo[key].selectedItem = d;
32433
32434
  const index = (_e2 = (_d2 = newInfo[key]) == null ? void 0 : _d2.data) == null ? void 0 : _e2.findIndex(
32434
- (d2) => (d2 == null ? void 0 : d2.id) == (d2 == null ? void 0 : d2.id)
32435
+ (d2) => (d2 == null ? void 0 : d2.id) == (data == null ? void 0 : data.id)
32435
32436
  );
32436
32437
  if (index >= 0) {
32437
32438
  newInfo[key].data[index] = d;
package/dist/index.mjs CHANGED
@@ -32416,10 +32416,11 @@ function useResources({
32416
32416
  }
32417
32417
  }
32418
32418
  }
32419
+ newInfo[key].data = newInfo[key].data.flat();
32419
32420
  } else {
32420
32421
  newInfo[key].selectedItem = d;
32421
32422
  const index = (_e2 = (_d2 = newInfo[key]) == null ? void 0 : _d2.data) == null ? void 0 : _e2.findIndex(
32422
- (d2) => (d2 == null ? void 0 : d2.id) == (d2 == null ? void 0 : d2.id)
32423
+ (d2) => (d2 == null ? void 0 : d2.id) == (data == null ? void 0 : data.id)
32423
32424
  );
32424
32425
  if (index >= 0) {
32425
32426
  newInfo[key].data[index] = d;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -168,10 +168,11 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
168
168
  }
169
169
  }
170
170
  }
171
+ newInfo[key].data = newInfo[key].data.flat();
171
172
  } else {
172
173
  newInfo[key].selectedItem = d;
173
174
  const index = newInfo[key]?.data?.findIndex(
174
- (d: any) => d?.id == d?.id
175
+ (d: any) => d?.id == data?.id
175
176
  );
176
177
  if (index >= 0) {
177
178
  newInfo[key].data[index] = d;