Skip to content

Commit d3cb195

Browse files
fix(gateway): improve proxyFactory logic to handle undefined responses
1 parent 313ba2b commit d3cb195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const PROXY_TYPES = ['http', 'lambda']
1515
const registerWebSocketRoutes = require('./lib/ws-proxy')
1616

1717
const gateway = (opts) => {
18-
const proxyFactory = (...args) => opts.proxyFactory?.(...args) ?? defaultProxyFactory(...args);
18+
const proxyFactory = opts.proxyFactory ? (...args) => ((r) => r === undefined ? defaultProxyFactory(...args) : r)(opts.proxyFactory(...args)) : defaultProxyFactory;
1919

2020
opts = Object.assign(
2121
{

0 commit comments

Comments
 (0)