@travetto/web-rpc 8.0.0-alpha.23 → 8.0.0-alpha.24
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/package.json +1 -1
- package/support/client/rpc.ts +3 -0
package/package.json
CHANGED
package/support/client/rpc.ts
CHANGED
|
@@ -281,6 +281,9 @@ export async function invokeFetch<T>(request: RpcRequest, ...params: unknown[]):
|
|
|
281
281
|
|
|
282
282
|
if (resolved.ok) {
|
|
283
283
|
const text = await resolved.text();
|
|
284
|
+
if (resolved.status === 204 || !contentType || !text) {
|
|
285
|
+
return undefined!;
|
|
286
|
+
}
|
|
284
287
|
if (contentType === 'application/json') {
|
|
285
288
|
return await request.consumeJSON!<T>(text);
|
|
286
289
|
} else if (contentType === 'text/plain') {
|