mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-25 21:15:55 +00:00
fix: ensure result is declared as a constant in mssqlQuery function
This commit is contained in:
parent
d3fc87a4b7
commit
ae5f8de538
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue