mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
handle undefined user-slected platform string
This commit is contained in:
parent
31342a4b66
commit
c392837434
1 changed files with 5 additions and 3 deletions
|
|
@ -166,9 +166,11 @@ const generateTableHeaders = ({
|
|||
accessor: "platforms",
|
||||
Cell: (cellProps: IPlatformCellProps): JSX.Element => {
|
||||
// translate the SelectedPlatformString into an array of `SupportedPlatform`s
|
||||
const selectedPlatforms = cellProps.row.original.platform
|
||||
.split(",")
|
||||
.filter((platform) => platform !== "") as SupportedPlatform[];
|
||||
const selectedPlatforms =
|
||||
(cellProps.row.original.platform
|
||||
?.split(",")
|
||||
.filter((platform) => platform !== "") as SupportedPlatform[]) ??
|
||||
[];
|
||||
|
||||
const platformIconsToRender: SupportedPlatform[] =
|
||||
selectedPlatforms.length === 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue