1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[EC-598] fix: some smaller bugs

This commit is contained in:
Andreas Coroiu
2023-03-31 15:53:10 +02:00
parent e8c9b887c4
commit 3edd7887a4
7 changed files with 52 additions and 39 deletions

View File

@@ -32,7 +32,19 @@ navigator.credentials.create = async (
throw new Error("Something went wrong.");
}
return WebauthnUtils.mapCredentialRegistrationResult(response.result);
console.log(response.result);
let mappedResult;
try {
mappedResult = WebauthnUtils.mapCredentialRegistrationResult(response.result);
} catch (e) {
console.error(e);
throw e;
}
console.log(mappedResult);
return mappedResult;
} catch (error) {
if (error && error.fallbackRequested) {
return await browserCredentials.create(options);
@@ -60,6 +72,8 @@ navigator.credentials.get = async (
throw new Error("Something went wrong.");
}
console.log(response.result);
return WebauthnUtils.mapCredentialAssertResult(response.result);
} catch (error) {
if (error && error.fallbackRequested) {