Fix optional chaining for userProfile in chore filters and adjust data destructuring in MyChores component
This commit is contained in:
parent
de08c6c5b1
commit
08de84a889
2 changed files with 4 additions and 5 deletions
|
@ -179,9 +179,9 @@ export const notInCompletionWindow = chore => {
|
|||
export const ChoreFilters = userProfile => ({
|
||||
anyone: () => true,
|
||||
assigned_to_me: chore => {
|
||||
return chore.assignedTo && chore.assignedTo === userProfile.id
|
||||
return chore.assignedTo && chore.assignedTo === userProfile?.id
|
||||
},
|
||||
assigned_to_others: chore => {
|
||||
return chore.assignedTo && chore.assignedTo !== userProfile.id
|
||||
return chore.assignedTo && chore.assignedTo !== userProfile?.id
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue