mirror of
https://github.com/mattermost/focalboard.git
synced 2025-03-26 20:53:55 +02:00
Added corner case check for multiperson property (#3793)
This commit is contained in:
parent
15e13fcdac
commit
9e813010d2
@ -61,6 +61,9 @@ const MultiPerson = (props: PropertyProps) => {
|
||||
const boardUsers = useAppSelector<IUser[]>(getBoardUsersList)
|
||||
|
||||
const formatOptionLabel = (user: any) => {
|
||||
if(!user) {
|
||||
return
|
||||
}
|
||||
let profileImg
|
||||
if (imageURLForUser) {
|
||||
profileImg = imageURLForUser(user.id)
|
||||
@ -83,9 +86,9 @@ const MultiPerson = (props: PropertyProps) => {
|
||||
|
||||
let users: IUser[] = []
|
||||
|
||||
if(typeof propertyValue === 'string') {
|
||||
if(typeof propertyValue === 'string' && propertyValue !== '') {
|
||||
users = [boardUsersById[propertyValue as string]]
|
||||
} else if(Array.isArray(propertyValue)) {
|
||||
} else if(Array.isArray(propertyValue) && propertyValue.length > 0) {
|
||||
users = propertyValue.map(id => boardUsersById[id])
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user