@veloxts/client 0.6.94 → 0.6.95
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/CHANGELOG.md +6 -0
- package/dist/client.js +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/client.js
CHANGED
|
@@ -412,6 +412,14 @@ async function executeProcedure(call, state, isRetry = false) {
|
|
|
412
412
|
if (state.config.onResponse) {
|
|
413
413
|
await state.config.onResponse(response);
|
|
414
414
|
}
|
|
415
|
+
// Unwrap tRPC response format: { result: { data: ... } }
|
|
416
|
+
const mode = detectMode(state.config);
|
|
417
|
+
if (mode === 'trpc' && body && typeof body === 'object') {
|
|
418
|
+
const trpcResponse = body;
|
|
419
|
+
if (trpcResponse.result?.data !== undefined) {
|
|
420
|
+
return trpcResponse.result.data;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
415
423
|
return body;
|
|
416
424
|
}
|
|
417
425
|
/**
|