fix: null transports

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
feat-otp-email-verify
James Elliott 2023-04-16 11:23:25 +10:00
parent c3e785872d
commit 7c69152a86
No known key found for this signature in database
GPG Key ID: 0F1C4A096E857E49
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ export interface WebAuthnDevice {
aaguid?: string;
attestation_type: string;
attachment: string;
transports: string[];
transports: null | string[];
sign_count: number;
clone_warning: boolean;
discoverable: boolean;

View File

@ -81,7 +81,7 @@ export default function WebAuthnDeviceDetailsDialog(props: Props) {
<PropertyText
name={translate("Transports")}
value={
props.device.transports.length === 0
props.device.transports === null || props.device.transports.length === 0
? "N/A"
: props.device.transports.map((transport) => toTransportName(transport)).join(", ")
}