Fix www replace.
This commit is contained in:
1 parent
52bbc3692d
commit
13cf286874
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ export const urlFilter = data => {
|
||||
try {
|
||||
const { pathname, search } = new URL(url, location.origin);
|
||||
|
||||
if (search.startsWith('?/')) {
|
||||
if (search.startsWith('?')) {
|
||||
return `${pathname}${search}`;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export const refFilter = data => {
|
||||
try {
|
||||
const url = new URL(x);
|
||||
|
||||
id = url.hostname.replace('www', '') || url.href;
|
||||
id = url.hostname.replace(/www\./, '') || url.href;
|
||||
} catch {
|
||||
id = '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user