mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2721 from ygoe/patch-1
Fix JavaScript error in console
This commit is contained in:
commit
5b9c6aaf34
1 changed files with 8 additions and 6 deletions
|
|
@ -201,12 +201,14 @@
|
|||
// select a software authenticator. This could be removed in the future.
|
||||
try {
|
||||
Object.defineProperty(navigator, 'credentials', { value: passkeysCredentials });
|
||||
Object.defineProperty(window.PublicKeyCredential, 'isConditionalMediationAvailable', {
|
||||
value: isConditionalMediationAvailable,
|
||||
});
|
||||
Object.defineProperty(window.PublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', {
|
||||
value: isUserVerifyingPlatformAuthenticatorAvailable,
|
||||
});
|
||||
if (window.PublicKeyCredential) {
|
||||
Object.defineProperty(window.PublicKeyCredential, 'isConditionalMediationAvailable', {
|
||||
value: isConditionalMediationAvailable,
|
||||
});
|
||||
Object.defineProperty(window.PublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', {
|
||||
value: isUserVerifyingPlatformAuthenticatorAvailable,
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Cannot override navigator.credentials: ', err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue