Thursday 20 September 2018

mongoose doesn't return the false values

router.get('/:_id', function(req, res, next) { Car.findById(req.params._id, function (err, cars) { if (err) { res.send(err); } res.render("cars", { cars: cars }); }); }); if i look trough mongo shell my object has false values but it actually return a cars object with everything true ** basically it cast the false value into true for some reason

Submitted September 21, 2018 at 05:20AM by shiust

No comments:

Post a Comment