We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66c6776 commit 40cc6aaCopy full SHA for 40cc6aa
lib/utils.js
@@ -70,7 +70,7 @@ var prepareValue = function (val, seen) {
70
}
71
72
function prepareObject (val, seen) {
73
- if (val.toPostgres && typeof val.toPostgres === 'function') {
+ if (val && typeof val.toPostgres === 'function') {
74
seen = seen || []
75
if (seen.indexOf(val) !== -1) {
76
throw new Error('circular reference detected while preparing "' + val + '" for query')
0 commit comments