Only return tasks when calendar is defined

This commit is contained in:
Raimund Schlüßler 2019-01-03 17:33:14 +01:00
parent 683eb47a8f
commit 9efc82c9ed
No known key found for this signature in database
GPG key ID: 036FA7EB1A599178

View file

@ -44,7 +44,9 @@ const getters = {
*/
getTasksByCalendarId: (state, getters, rootState) => (calendarId) => {
var calendar = getters.getCalendarById(calendarId)
if (calendar) {
return Object.values(calendar.tasks)
}
},
/**