Skip to content

Commit e542459

Browse files
committed
fallback for all
1 parent 2cf7336 commit e542459

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/utils.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,19 @@ export const assertDev = (matter: string) => {
109109
return true;
110110
};
111111

112-
export const isAndroid70AndBelow = () => {
113-
// android 7.0 and below devices do not support letsencrypt cert
114-
// https://letsencrypt.org/2023/07/10/cross-sign-expiration/
115-
return Platform.OS === 'android' && Platform.Version <= 24;
116-
};
112+
// export const isAndroid70AndBelow = () => {
113+
// // android 7.0 and below devices do not support letsencrypt cert
114+
// // https://letsencrypt.org/2023/07/10/cross-sign-expiration/
115+
// return Platform.OS === 'android' && Platform.Version <= 24;
116+
// };
117117

118118
export const enhancedFetch = async (
119119
url: string,
120120
params: Parameters<typeof fetch>[1],
121121
) => {
122122
return fetch(url, params).catch(e => {
123123
log('fetch error', url, e);
124-
if (isAndroid70AndBelow()) {
125-
log(`try fallback to http because android version: ${Platform.Version}`);
126-
return fetch(url.replace('https', 'http'), params);
127-
}
128-
throw e;
124+
log('trying fallback to http');
125+
return fetch(url.replace('https', 'http'), params);
129126
});
130127
};

0 commit comments

Comments
 (0)