Skip to content

Commit 3f8b333

Browse files
committed
fix(extension): complete access grants after dialog dismissal
1 parent 113db58 commit 3f8b333

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎apps/extension/src/site-access.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ export function PageAccessButton({ allowed, onAccessGranted }: PageAccessButtonP
2323
setStatus('requesting')
2424
try {
2525
const granted = await chrome.permissions.request({ origins: PAGE_ACCESS_ORIGINS })
26-
if (!mounted.current) return
27-
if (granted) {
28-
setStatus('idle')
29-
onAccessGranted()
30-
} else setStatus('idle')
26+
if (mounted.current) setStatus('idle')
27+
if (granted) onAccessGranted()
3128
} catch {
3229
if (mounted.current) setStatus('error')
3330
}

0 commit comments

Comments
 (0)