79301838

Date: 2024-12-22 22:39:11
Score: 2
Natty:
Report link

I had this issue recently, the answer for me was that findOneAndUpdate(query, rule) is asynchronous, so you have to await or then

Eg. var savedObj = await MyObj.findOneAndUpdate(query, newobj)

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kendall Cable