Skip to content

Commit e0d4fe8

Browse files
committed
print body for harmony
1 parent 49b0c25 commit e0d4fe8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,11 @@ export class Pushy {
226226
// @ts-ignore
227227
delete fetchBody.buildTime;
228228
}
229+
const stringifyBody = JSON.stringify(fetchBody);
229230
// harmony fetch body is not string
230231
let body: any = fetchBody;
231232
if (Platform.OS === 'ios' || Platform.OS === 'android') {
232-
body = JSON.stringify(fetchBody);
233+
body = stringifyBody;
233234
}
234235
const fetchPayload = {
235236
method: 'POST',
@@ -243,7 +244,7 @@ export class Pushy {
243244
try {
244245
this.report({
245246
type: 'checking',
246-
message: this.options.appKey + ': ' + body,
247+
message: this.options.appKey + ': ' + stringifyBody,
247248
});
248249
resp = await fetch(this.getCheckUrl(), fetchPayload);
249250
} catch (e: any) {

0 commit comments

Comments
 (0)