diff --git a/index.js b/index.js index c7c2296..e32af26 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,11 @@ try { startServerSpan: undefined, experimentalHttpsServer: useHTTPS }); - handle = initResponse[0]; + if (initResponse.requestHandler) { + handle = initResponse.requestHandler; + } else { + handle = initResponse[0]; + } isPrepared = true; } catch (err) { nextError = err;