Skip to content

Commit b421219

Browse files
author
Luca Forstner
committed
Fix sendReport return value
1 parent f0d21c2 commit b421219

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/browser/src/transports/utils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ export function sendReport(url: string, body: string): void {
9393
if (hasSendBeacon) {
9494
// Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
9595
const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);
96-
return sendBeacon(url, body);
97-
}
98-
99-
if (supportsFetch()) {
96+
sendBeacon(url, body);
97+
} else if (supportsFetch()) {
10098
const fetch = getNativeFetchImplementation();
10199
fetch(url, {
102100
body,

0 commit comments

Comments
 (0)