From 1c456e2d5c69b8f4f026fa22ec73c794848668bf Mon Sep 17 00:00:00 2001 From: Collin Brown Date: Fri, 25 Sep 2020 08:18:11 -0400 Subject: [PATCH] Adding isEmpty getter in store/project.js --- frontend/store/projects.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/store/projects.js b/frontend/store/projects.js index 7056ceab..be6fe2c6 100644 --- a/frontend/store/projects.js +++ b/frontend/store/projects.js @@ -12,6 +12,9 @@ export const getters = { const isProjectAdministrator = project => project.current_users_role.is_project_admin return state.selected.length > 0 && state.selected.every(isProjectAdministrator) }, + isEmpty(state) { + return Object.keys(state.current).length === 0 && state.current.constructor === Object + }, currentProject(state) { return state.current },