fix even more oddities
This commit is contained in:
parent
78379601f0
commit
a9c7118b43
1 changed files with 3 additions and 1 deletions
4
site.js
4
site.js
|
@ -40,6 +40,7 @@ async function urlCollector(url, path, file, useLimit) {
|
||||||
let h2;
|
let h2;
|
||||||
try {
|
try {
|
||||||
h2 = new URL(h);
|
h2 = new URL(h);
|
||||||
|
if (h2.pathname == '' || !h2.pathname) h2.pathname = '/'
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +51,9 @@ async function urlCollector(url, path, file, useLimit) {
|
||||||
let h3;
|
let h3;
|
||||||
try {
|
try {
|
||||||
h3 = new URL(new URL(url).origin);
|
h3 = new URL(new URL(url).origin);
|
||||||
|
h3.pathname = '/';
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
return;
|
return [...new Set(urls)];
|
||||||
}
|
}
|
||||||
urls.push(h3.toString())
|
urls.push(h3.toString())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue