From 282d730ff4dd0467d1fcdc03b398e5872c2aef1d Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 11 Jun 2023 11:15:18 -0300 Subject: [PATCH] ensure new permissions are saved before releasing mutex. --- extension/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/background.js b/extension/background.js index c408e37..392fbad 100644 --- a/extension/background.js +++ b/extension/background.js @@ -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