fix(browser): prevent registration-induced crash (#6799)
Fixed a bug where `authenticatorSelection` may be undefined and cause the extension to crash when attempting to register a new credential. Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
This commit is contained in:
parent
e980a778de
commit
e961761ee9
|
@ -62,9 +62,9 @@ navigator.credentials.create = async (
|
|||
}
|
||||
|
||||
const fallbackSupported =
|
||||
(options?.publicKey?.authenticatorSelection.authenticatorAttachment === "platform" &&
|
||||
(options?.publicKey?.authenticatorSelection?.authenticatorAttachment === "platform" &&
|
||||
browserNativeWebauthnPlatformAuthenticatorSupport) ||
|
||||
(options?.publicKey?.authenticatorSelection.authenticatorAttachment !== "platform" &&
|
||||
(options?.publicKey?.authenticatorSelection?.authenticatorAttachment !== "platform" &&
|
||||
browserNativeWebauthnSupport);
|
||||
try {
|
||||
const response = await messenger.request(
|
||||
|
|
Loading…
Reference in New Issue