Express Backend deployed on Heroku returns the Result of an Update on a Mongodb Atlas DB as Undefined

I make a call from my front-end to my Express backend, which contains the following code. In my Development environment, everything works perfectly and a nonce is returned to the front-end. However, once my app has been deployed to Heroku (without modification) and my Mongodb database to the Mongo Atlas platform, the "result" returns as undefined, although I have confirmed that the database is being updated properly with a nonce. Why is this?'/api/login', (req, res) => {   ...   db.collection("Users").updateOne(query, updatevalue, (err, result) => {     if (result) { // Is Undefined       res.send(`$  {nonce}`)     } else {       res.send(null)     }   })  }