Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: postgres.js date serialiser #3168

Open
wants to merge 3 commits into
base: beta
Choose a base branch
from

Conversation

TypicalDefender
Copy link

Passing a Date object will result in an error: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer

Comment on lines +31 to +33
if (Object.prototype.toString.call(val) === '[object Date]') {
return (val as Date).toISOString();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use val instanceof Date?

@AndriiSherman AndriiSherman changed the base branch from main to beta November 3, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants