Skip to content

Commit

Permalink
Fix stringifyObjectParams (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
webda2l authored Nov 1, 2024
1 parent 55ba28b commit 9c1d29a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@a2lix/schemql",
"version": "0.3.0",
"version": "0.3.1",
"description": "A lightweight TypeScript library that enhances your SQL workflow by combining raw SQL with targeted type safety and schema validation",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/schemql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export class SchemQl<DB> {
const stringifyObjectParams = (params: Record<string, any>) =>
Object.entries(params).reduce(
(acc, [key, value]) => {
acc[key] = typeof value === 'object' ? JSON.stringify(value) : value
acc[key] = value !== null && typeof value === 'object' ? JSON.stringify(value) : value
return acc
},
{} as Record<string, any>
Expand Down

0 comments on commit 9c1d29a

Please sign in to comment.