Device manager - filter out nulled metadatas in device tile properly (PSG-703) (#9251)

* filter out nulled metadatas in device tile properly

* remove log
This commit is contained in:
Kerry 2022-09-12 13:06:12 +02:00 committed by GitHub
parent 0ab476b828
commit d69393a3aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 27 deletions

View file

@ -99,10 +99,12 @@ const DeviceTile: React.FC<DeviceTileProps> = ({ device, children, onClick }) =>
<DeviceTileName device={device} />
<div className="mx_DeviceTile_metadata">
{ metadata.map(({ id, value }, index) =>
<Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>,
!!value
? <Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>
: null,
) }
</div>
</div>