Skip to content

Commit aea8824

Browse files
committed
Add support for undefined parameters to the Filter compiler
1 parent bc915b3 commit aea8824

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strontium",
3-
"version": "2.7.8",
3+
"version": "2.7.9",
44
"description": "Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/query/drivers/sql/SQLFilterCompiler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export const compileSQLFilter: FilterCompiler<[string, Array<any>]> = (
3939

4040
let subquery = filter[field]
4141

42-
if (subquery === null) {
42+
if (subquery === undefined) {
43+
continue
44+
} else if (subquery === null) {
4345
queries.push(["?? IS NULL", [field]])
4446
} else if (subquery.$in !== undefined) {
4547
if (subquery.$in.length === 0) {

0 commit comments

Comments
 (0)