mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-27 16:08:21 -04:00
fix: ensure result is declared as a constant in mssqlQuery function
This commit is contained in:
parent
d3fc87a4b7
commit
ae5f8de538
@ -331,7 +331,7 @@ exports.mssqlQuery = async function (connectionString, handleEmptyResult, query)
|
||||
if (!query) {
|
||||
query = "SELECT 1";
|
||||
}
|
||||
result = await pool.request().query(query);
|
||||
const result = await pool.request().query(query);
|
||||
if (Array.isArray(result.recordset)) {
|
||||
if (handleEmptyResult && result.recordset.length === 0) {
|
||||
throw new Error("No rows returned");
|
||||
|
Loading…
x
Reference in New Issue
Block a user