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

fix platform check

This commit is contained in:
sunny.luo
2025-01-15 17:11:23 +08:00
parent 08547b7c8d
commit a0adf1e778

View File

@@ -205,9 +205,10 @@ export class Pushy {
// @ts-ignore // @ts-ignore
delete fetchBody.buildTime; delete fetchBody.buildTime;
} }
let body = JSON.stringify(fetchBody); // harmony fetch body is not string
if (Platform.OS === 'harmony') { let body: any = fetchBody;
body = fetchBody; if (Platform.OS === 'ios' || Platform.OS === 'android') {
body = JSON.stringify(fetchBody);
} }
const fetchPayload = { const fetchPayload = {
method: 'POST', method: 'POST',