Merge new changes

This commit is contained in:
varjolintu 2023-08-08 09:34:20 +03:00
parent 371514ac87
commit 1e5ec03d79
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ keepassProtocol.associate = async function(tab) {
keepass.associated.value = true;
keepass.associated.hash = response.hash || 0;
browserAction.show(tab);
browserAction.showDefault(tab);
return AssociatedAction.NEW_ASSOCIATION;
}

View file

@ -37,7 +37,7 @@ keepassClient.sendNativeMessage = function(request, enableTimeout = false, timeo
const handler = (msg) => {
if (msg && msg?.action === action) {
// If the request has a separate requestID, check if it matches when there's no nonce (an error message)
const isNotificationOrError = !msg.nonce && request.requestID === msg.requestID;
const isNotificationOrError = !msg.nonce && (request.requestID === msg.requestID || (msg.error && msg.errorCode));
// Only resolve a matching response or a notification (without nonce)
if (isNotificationOrError || messageBuffer.matchAndRemove(msg)) {