Browse Source

Adding isEmpty getter in store/project.js

pull/976/head
Collin Brown 4 years ago
parent
commit
1c456e2d5c
1 changed files with 3 additions and 0 deletions
  1. 3
      frontend/store/projects.js

3
frontend/store/projects.js

@ -12,6 +12,9 @@ export const getters = {
const isProjectAdministrator = project => project.current_users_role.is_project_admin const isProjectAdministrator = project => project.current_users_role.is_project_admin
return state.selected.length > 0 && state.selected.every(isProjectAdministrator) return state.selected.length > 0 && state.selected.every(isProjectAdministrator)
}, },
isEmpty(state) {
return Object.keys(state.current).length === 0 && state.current.constructor === Object
},
currentProject(state) { currentProject(state) {
return state.current return state.current
}, },

Loading…
Cancel
Save