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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user