Support .toPostgres() on Array-derived objects by mordae · Pull Request #3360 · brianc/node-postgres
How is the condition incorrect?
It’s missing
typeof.
🤦♂️ thanks. I must have been asleep.
Will fix.
Regardless of your judgement on goodness or badness of extending built-in prototypes, users are going to, when they need to.
Well, users can’t do that in this case because we don’t currently support it, and I’m making an argument against adding support for it.
If you see the linked issue, users have been doing exactly that by modifying the method on the fly.
But OK, if you disagree, feel free to close the issue. This was preferable solution for me, but I can probably solve my use case in other ways or apply the patch locally.