diff --git a/server/controllers/project.controller.js b/server/controllers/project.controller.js index 978207a0..a171ce9f 100644 --- a/server/controllers/project.controller.js +++ b/server/controllers/project.controller.js @@ -143,6 +143,10 @@ export function getProjectAsset(req, res) { if (err) { return res.status(404).send({ message: 'Project with that id does not exist' }); } + if (!project) { + console.error(req.params.project_id); + return res.status(404).send({ message: 'Project with that id does not exist' }); + } let assetURL = null; const seekPath = req.params[0]; // req.params.asset_path;