return null if error
This commit is contained in:
parent
2845a4302a
commit
592e13b77b
@ -20,5 +20,7 @@ export const testUrls = async (urls?: string[]) => {
|
||||
if (!urls?.length || (await canUseGoogle)) {
|
||||
return null;
|
||||
}
|
||||
return Promise.race(urls.map((url) => ping(url).then(() => url)));
|
||||
return Promise.race(urls.map((url) => ping(url).then(() => url))).catch(
|
||||
() => null,
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user