Skip to content

Commit

Permalink
fixing mysql testing
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Oct 11, 2024
1 parent 6f9253f commit b311bf1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/connections/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export class MySQLConnection implements BaseConnection {
): Promise<QueryResult<T>> {
const rows = await new Promise<RowDataPacket[]>((r) =>
this.conn.query(query.query, query.parameters, (_, result) => {
r((result as RowDataPacket[]) ?? []);
if (Array.isArray(result)) {
r((result as RowDataPacket[]) ?? []);
}
return r([]);
})
);

Expand Down

0 comments on commit b311bf1

Please sign in to comment.