Skip to content

Commit

Permalink
fix #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 d43e04b commit 840fe85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drizzle-orm/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 840fe85

Please sign in to comment.