Skip to content

Commit

Permalink
fix drizzle-team#330: fix adding of typings when merging queries
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgmcd committed Apr 26, 2023
1 parent b7294b0 commit 8659565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ function mergeQueries(queries: Query[]): Query {
for (const query of queries) {
result.sql += query.sql;
result.params.push(...query.params);
if (result.typings && query.typings?.length) {
if (query.typings?.length) {
result.typings = result.typings || [];
result.typings.push(...query.typings);
}
}
Expand Down

0 comments on commit 8659565

Please sign in to comment.