Skip to content

Commit 40cc6aa

Browse files
vitaly-tbrianc
authored andcommitted
Update utils.js
fixing invalid custom type check
1 parent 66c6776 commit 40cc6aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var prepareValue = function (val, seen) {
7070
}
7171

7272
function prepareObject (val, seen) {
73-
if (val.toPostgres && typeof val.toPostgres === 'function') {
73+
if (val && typeof val.toPostgres === 'function') {
7474
seen = seen || []
7575
if (seen.indexOf(val) !== -1) {
7676
throw new Error('circular reference detected while preparing "' + val + '" for query')

0 commit comments

Comments
 (0)