BUGFIX: internal url can start with /
This commit is contained in:
parent
95bbe6d9ce
commit
809fae2edd
@ -48,4 +48,7 @@ function initExternalLinks() {
|
||||
})
|
||||
}
|
||||
|
||||
const isExternalURL = (url) => new URL(url).origin !== location.origin;
|
||||
const isExternalURL = (url) => {
|
||||
if(url.startsWith('/')) return false;
|
||||
return new URL(url).origin !== location.origin;
|
||||
}
|
Loading…
Reference in New Issue
Block a user