Add image?.

This commit is contained in:
Brian Cao 2023-07-11 18:35:01 -07:00
parent f90631b3fb
commit 5390370b3d
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ export function DevicesTable({ websiteId, ...props }) {
label={formatMessage(labels[device] || labels.unknown)}
>
<img
src={`${basePath}/images/device/${device.toLowerCase() || 'unknown'}.png`}
src={`${basePath}/images/device/${device?.toLowerCase() || 'unknown'}.png`}
alt={device}
width={16}
height={16}

View File

@ -12,7 +12,7 @@ export function OSTable({ websiteId, ...props }) {
<FilterLink id="os" value={os}>
<img
src={`${basePath}/images/os/${
os.toLowerCase().replaceAll(/[^\w]+/g, '-') || 'unknown'
os?.toLowerCase().replaceAll(/[^\w]+/g, '-') || 'unknown'
}.png`}
alt={os}
width={16}