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
|
// @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',
|
||||||
|
Reference in New Issue
Block a user