fix: meta tag injector uses property, not name (#7431)

This commit is contained in:
Connor McEwen 2023-10-06 11:46:39 -04:00 committed by GitHub
parent 932c4482d2
commit fd24cb890a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -162,7 +162,7 @@ export default function App() {
return null
}
const blockedPaths = document.querySelector('meta[name="x:blocked-paths"]')?.getAttribute('content')?.split(',')
const blockedPaths = document.querySelector('meta[property="x:blocked-paths"]')?.getAttribute('content')?.split(',')
const shouldBlockPath = blockedPaths?.includes(pathname) ?? false
if (shouldBlockPath && pathname !== '/swap') {
return <Navigate to="/swap" replace />