1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-29 20:43:09 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix class properties

This commit is contained in:
sunnylqm
2025-02-23 17:26:59 +08:00
parent 3ccc3653ac
commit 4436654769
4 changed files with 57 additions and 40 deletions

View File

@@ -84,3 +84,23 @@ export const testUrls = async (urls?: string[]) => {
log('all ping failed, use first url:', urls[0]);
return urls[0];
};
export const assertWeb = () => {
if (Platform.OS === 'web') {
console.warn(
'react-native-update does not support the Web platform and will not perform any operations',
);
return false;
}
return true;
};
export const assertDev = (matter: string) => {
if (__DEV__) {
console.warn(
`${matter} is not supported in development environment; no action taken.`,
);
return false;
}
return true;
};