@feardread/feature-factory 5.1.0 → 5.1.1
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/bundle.min.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/factory/utils.js +2 -2
package/package.json
CHANGED
package/src/factory/utils.js
CHANGED
|
@@ -282,10 +282,10 @@ export const addHandlers = (builder, asyncActions, entity) => {
|
|
|
282
282
|
|
|
283
283
|
// Handle different response structures
|
|
284
284
|
const payload = actionPayload.payload;
|
|
285
|
-
|
|
285
|
+
console.log('payload = ', payload);
|
|
286
286
|
// Update data based on operation type
|
|
287
287
|
if (key === 'fetch' || key === 'search') {
|
|
288
|
-
state.data = Array.isArray(payload) ? payload : (payload?.data || []);
|
|
288
|
+
state.data = Array.isArray(payload) ? payload : (payload?.data.result || []);
|
|
289
289
|
} else if (key === 'fetchOne') {
|
|
290
290
|
state[entity] = Array.isArray(payload) ? payload[0] : payload;
|
|
291
291
|
} else if (key === 'create') {
|