Skip to content

Commit

Permalink
fix: page stop working as assigneeIds undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
hudy9x committed Jul 15, 2024
1 parent 6e6c767 commit 904063c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ui-app/app/_features/ProjectContainer/useGetTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import useTaskFilterContext from '../TaskFilter/useTaskFilterContext'
import { getGoalieUser } from '@goalie/nextjs'

const getAssigneeIds = (assigneeIds: string[]) => {
if (!assigneeIds || !assigneeIds.length) return ['null']
if (assigneeIds.includes('ALL')) return undefined

assigneeIds = assigneeIds.map(uid => {
const user = getGoalieUser()
if (uid === 'ME' && user?.id) {
Expand All @@ -17,8 +20,6 @@ const getAssigneeIds = (assigneeIds: string[]) => {

return uid
})
if (assigneeIds.includes('ALL')) return undefined
if (!assigneeIds.length) return ['null']

return assigneeIds.filter(a => a !== 'ALL')
}
Expand Down

0 comments on commit 904063c

Please sign in to comment.