Skip to content

Commit fb53a69

Browse files
authored
Merge pull request #44 from ExodusMovement/sergii-bo/feat/give-granular-control-over-page-load
feat: give granular control over page load
2 parents 0abc1f1 + a39cae3 commit fb53a69

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/WebViewShared.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ const _passesWhitelist = (
4242
url: string,
4343
) => {
4444
try {
45-
const { origin } = new URL(url)
46-
return origin && matchWithRegexList(compiledWhitelist, origin)
45+
const { href, origin } = new URL(url)
46+
47+
if (origin && origin !== 'null') {
48+
return matchWithRegexList(compiledWhitelist, origin);
49+
}
50+
51+
return matchWithRegexList(compiledWhitelist, href)
4752
} catch {
4853
return false
4954
}

0 commit comments

Comments
 (0)