You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cbratschi
changed the title
Mongoose adapter sets beginTransaction to undefined which is not a valid value
MongoDB adapter sets beginTransaction to undefined which is not a valid value
Jan 15, 2025
Describe the Bug
The code here sets beginTransaction to undefined if there is no replica set:
https://github.com/payloadcms/payload/blob/main/packages/db-mongodb/src/connect.ts#L48
However, undefined is not a valid value. Better use:
Where null is a supported return type.
Link to the code that reproduces this issue
https://github.com/cbratschi/payload
Reproduction Steps
See above.
Which area(s) are affected? (Select all that apply)
db-mongodb
Environment Info
The text was updated successfully, but these errors were encountered: