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;
|
||||
try {
|
||||
h2 = new URL(h);
|
||||
if (h2.pathname == '' || !h2.pathname) h2.pathname = '/'
|
||||
} catch(err) {
|
||||
return;
|
||||
}
|
||||
|
@ -50,8 +51,9 @@ async function urlCollector(url, path, file, useLimit) {
|
|||
let h3;
|
||||
try {
|
||||
h3 = new URL(new URL(url).origin);
|
||||
h3.pathname = '/';
|
||||
} catch(err) {
|
||||
return;
|
||||
return [...new Set(urls)];
|
||||
}
|
||||
urls.push(h3.toString())
|
||||
|
||||
|
|
Loading…
Reference in a new issue