fix: 修复 CodeQL code scanning warning 问题

This commit is contained in:
hicccc77
2026-03-28 21:12:29 +08:00
parent 49fb96d7a3
commit 26c6700152
4 changed files with 6 additions and 6 deletions

View File

@@ -2009,7 +2009,7 @@ class ChatService {
selectableColumns = resolvedColumns
}
if (!selectableColumns || selectableColumns.length === 0) return rows
if (selectableColumns.length === 0) return rows
const selectColumns = ['username', ...selectableColumns]
const sql = `SELECT ${selectColumns.map((column) => this.quoteSqlIdentifier(column)).join(', ')} FROM contact WHERE username IS NOT NULL AND username != ''`