From 865956521a9e217b4d125eec7c09ad98b2a50fb0 Mon Sep 17 00:00:00 2001 From: Michael McDermott Date: Wed, 26 Apr 2023 10:34:42 -0400 Subject: [PATCH] fix #330: fix adding of typings when merging queries --- src/sql/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/index.ts b/src/sql/index.ts index 0a444ca7e..7a782876c 100644 --- a/src/sql/index.ts +++ b/src/sql/index.ts @@ -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); } }