1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:01: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
delete fetchBody.buildTime;
}
let body = JSON.stringify(fetchBody);
if (Platform.OS === 'harmony') {
body = fetchBody;
// harmony fetch body is not string
let body: any = fetchBody;
if (Platform.OS === 'ios' || Platform.OS === 'android') {
body = JSON.stringify(fetchBody);
}
const fetchPayload = {
method: 'POST',