mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 11:51:38 +08:00
fix platform check
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user