mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 22:20:39 +08:00
return null if error
This commit is contained in:
@@ -20,5 +20,7 @@ export const testUrls = async (urls?: string[]) => {
|
|||||||
if (!urls?.length || (await canUseGoogle)) {
|
if (!urls?.length || (await canUseGoogle)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return Promise.race(urls.map((url) => ping(url).then(() => url)));
|
return Promise.race(urls.map((url) => ping(url).then(() => url))).catch(
|
||||||
|
() => null,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user