Skip to content

Commit a0adf1e

Browse files
author
sunny.luo
committed
fix platform check
1 parent 08547b7 commit a0adf1e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/client.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ export class Pushy {
205205
// @ts-ignore
206206
delete fetchBody.buildTime;
207207
}
208-
let body = JSON.stringify(fetchBody);
209-
if (Platform.OS === 'harmony') {
210-
body = fetchBody;
208+
// harmony fetch body is not string
209+
let body: any = fetchBody;
210+
if (Platform.OS === 'ios' || Platform.OS === 'android') {
211+
body = JSON.stringify(fetchBody);
211212
}
212213
const fetchPayload = {
213214
method: 'POST',

0 commit comments

Comments
 (0)