Skip to content

Commit

Permalink
Merge b051204 into b50f837
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Mar 23, 2021
2 parents b50f837 + b051204 commit 6c08e65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import * as zipkinTypes from '../../types';
*/
export function prepareSend(urlStr: string, headers?: Record<string, string>) {
let xhrHeaders: Record<string, string>;
const useBeacon = navigator.sendBeacon && !headers;
const useBeacon = typeof navigator.sendBeacon === 'function' && !headers;
if (headers) {
xhrHeaders = {
Accept: 'application/json',
Expand Down

0 comments on commit 6c08e65

Please sign in to comment.