javascript - TypeError: Cannot read property 'split' of undefined | Schema issue? -


i cannot read property 'split' of undefined when following code:

router.get("/startup/:id", function(req, res) {     // uses id in url find id in      // database passes data foundstartup     startup.findbyid(req.params.id).exec(function(err, foundstartup){         if(err) {             console.log(err);         } else {             var split = foundstartup.aboutstartup.techstack.split(",");             res.render("startup/show", {startup :foundstartup, split: split});         }     }); }); 

it used work went , removed '_' schema , therefore everywhere had schema called. have no idea why error pop now. have gone through every file created project , nothing left old references. have spent 2 ish hours on google , stackoverflow looking @ others solutions , none have worked me code started used work.

suggestions on solutions? maybe should add error checking instead of later?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -