From 36d969e6e6b0629b452cc8e7fbe4770d8bc05e5d Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 15 Aug 2016 15:22:23 +0100 Subject: [PATCH] Set invites to be an empty array if missing --- .../app/coffee/Features/Project/ProjectEditorHandler.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee index a20cc99fc0..1a10321544 100644 --- a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee @@ -15,7 +15,10 @@ module.exports = ProjectEditorHandler = deletedByExternalDataSource : project.deletedByExternalDataSource || false deletedDocs: project.deletedDocs members: [] - invites: invites || [] + invites: invites + + if !result.invites? + result.invites = [] {owner, ownerFeatures, members} = @buildOwnerAndMembersViews(members) result.owner = owner