ensure new permissions are saved before releasing mutex.

This commit is contained in:
fiatjaf
2023-06-11 11:15:18 -03:00
parent 6938503893
commit 282d730ff4

View File

@@ -188,13 +188,13 @@ async function handleContentScriptMessage({type, params, host}) {
}
}
function handlePromptMessage({id, host, type, accept, conditions}, sender) {
async function handlePromptMessage({host, type, accept, conditions}, sender) {
// return response
openPrompt?.resolve?.(accept)
// update policies
if (conditions) {
updatePermission(host, type, accept, conditions)
await updatePermission(host, type, accept, conditions)
}
// cleanup this