Skip to content

Commit

Permalink
BUG: don't treat dates as objects (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaip authored Jul 28, 2023
1 parent e053d41 commit baa25b8
Show file tree
Hide file tree
Showing 2 changed files with 7 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": "@joindeed/prisma-auth",
"version": "1.2.6",
"version": "1.2.7",
"description": "Declarative Prisma Authorization layer",
"main": "dist/index.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion src/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ export class PrismaSelect {
}

static isObject(item: any) {
return item && typeof item === 'object' && !Array.isArray(item)
return (
item &&
typeof item === 'object' &&
!Array.isArray(item) &&
Object.prototype.toString.call(item) !== '[object Date]'
)
}

static mergeDeep(target: any, ...sources: any[]): any {
Expand Down

0 comments on commit baa25b8

Please sign in to comment.