diff --git a/server/controllers/file.controller.js b/server/controllers/file.controller.js index 3762ffe7..4ccb6db2 100644 --- a/server/controllers/file.controller.js +++ b/server/controllers/file.controller.js @@ -111,7 +111,7 @@ export function deleteFile(req, res) { export function getFileContent(req, res) { Project.findById(req.params.project_id, (err, project) => { - if (err || project == null) { + if (err || project === null) { res.status(404).send({ success: false, message: 'Project with that id does not exist.' }); return; } diff --git a/server/utils/filePath.js b/server/utils/filePath.js index 6a1ea673..4e12a82c 100644 --- a/server/utils/filePath.js +++ b/server/utils/filePath.js @@ -1,5 +1,5 @@ export function resolvePathToFile(filePath, files) { - if (typeof filePath === 'undefined') { + if (filePath === undefined) { return false; }