Skip to content

Commit

Permalink
fix: check for null in isEmptyObject
Browse files Browse the repository at this point in the history
Because of course `typeof null` is `'object'`
  • Loading branch information
rintaun authored Jan 22, 2023
1 parent 1a07a56 commit a8641c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datasource/queries/QueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ export default class QueryBuilder<Info extends TableInfo> {
}

private isEmptyObject(value: unknown): boolean {
return typeof value === 'object' && Object.keys(value).length === 0
return typeof value === 'object' && value !== null && Object.keys(value).length === 0
}

private valueToSql(
Expand Down

0 comments on commit a8641c7

Please sign in to comment.