From 0d85a7526f158b82112e825d2a12569f9ae9d3f0 Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Fri, 1 Mar 2024 13:57:35 -0800 Subject: [PATCH] Fix cannot set sendRequest on undefined in Next.js apps --- lib/connection/statement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection/statement.js b/lib/connection/statement.js index e73652483..d70fc085b 100644 --- a/lib/connection/statement.js +++ b/lib/connection/statement.js @@ -1255,7 +1255,7 @@ function sendRequestPreExec(statementContext, onResultAvailable) { true); } -this.sendRequest = function (statementContext, onResultAvailable) { +const sendRequest = function (statementContext, onResultAvailable) { // get the request headers const headers = statementContext.resultRequestHeaders;