Skip to content

Commit

Permalink
fix platform check
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny.luo committed Jan 15, 2025
1 parent 08547b7 commit a0adf1e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit a0adf1e

Please sign in to comment.