From 970125b7a830a13fd695ed99bbdbe9554513a610 Mon Sep 17 00:00:00 2001 From: James Allen Date: Mon, 24 Nov 2014 13:43:08 +0000 Subject: [PATCH] Check for null project in joinProject --- services/web/app/coffee/Features/Editor/EditorController.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/app/coffee/Features/Editor/EditorController.coffee b/services/web/app/coffee/Features/Editor/EditorController.coffee index f8d3e5da37..4b19458e03 100644 --- a/services/web/app/coffee/Features/Editor/EditorController.coffee +++ b/services/web/app/coffee/Features/Editor/EditorController.coffee @@ -63,6 +63,7 @@ module.exports = EditorController = buildJoinProjectView: (project_id, user_id, callback = (error, project, privilegeLevel) ->) -> ProjectGetter.getProjectWithoutDocLines project_id, (error, project) -> return callback(error) if error? + return callback(new Error("not found")) if !project? ProjectGetter.populateProjectWithUsers project, (error, project) -> return callback(error) if error? UserGetter.getUser user_id, { isAdmin: true }, (error, user) ->