Skip to content

Commit

Permalink
fix(mysql): remove redundant invariant checks now that Promise.race i…
Browse files Browse the repository at this point in the history
…s gone
  • Loading branch information
reecefenwick committed Feb 17, 2025
1 parent fc1fcc7 commit 3169b7e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drizzle-orm/src/mysql2/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ export class MySql2PreparedQuery<T extends MySqlPreparedQueryConfig> extends MyS
const stream = driverQuery.stream();

for await (const row of stream) {
if (row === undefined || (Array.isArray(row) && row.length === 0)) {
break;
} else if (row instanceof Error) { // eslint-disable-line no-instanceof/no-instanceof
throw row;
}

if (hasRowsMapper) {
if (customResultMapper) {
const mappedRow = customResultMapper([row as unknown[]]);
Expand Down

0 comments on commit 3169b7e

Please sign in to comment.