Skip to content

Commit

Permalink
Prevent undefined in insert statement
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Feb 26, 2024
1 parent cb4ca31 commit 200740a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db/sqljsAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class SqljsAdapter implements DBAdapter {
bindAndInsert (statement: any, params?: [] | Record<string, DBValue>): number {
if (params && !(params instanceof Array)) {
for (const key in params) {
params['$' + key] = params[key];
params['$' + key] = typeof params[key] === 'undefined' ? null : params[key];
}
}
return statement.run(params).lastInsertRowid;
Expand Down

0 comments on commit 200740a

Please sign in to comment.