mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Update utils.js
fixing invalid custom type check
This commit is contained in:
parent
66c6776f6e
commit
40cc6aa111
@ -70,7 +70,7 @@ var prepareValue = function (val, seen) {
|
||||
}
|
||||
|
||||
function prepareObject (val, seen) {
|
||||
if (val.toPostgres && typeof val.toPostgres === 'function') {
|
||||
if (val && typeof val.toPostgres === 'function') {
|
||||
seen = seen || []
|
||||
if (seen.indexOf(val) !== -1) {
|
||||
throw new Error('circular reference detected while preparing "' + val + '" for query')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user