From b051204af81d02b98bcd0b6b9b71ff70932edd0f Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Tue, 23 Mar 2021 14:55:51 -0400 Subject: [PATCH] chore: use a check the compiler does not recognize as always true --- .../opentelemetry-exporter-zipkin/src/platform/browser/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opentelemetry-exporter-zipkin/src/platform/browser/util.ts b/packages/opentelemetry-exporter-zipkin/src/platform/browser/util.ts index 940f7439b9..f0409d982d 100644 --- a/packages/opentelemetry-exporter-zipkin/src/platform/browser/util.ts +++ b/packages/opentelemetry-exporter-zipkin/src/platform/browser/util.ts @@ -27,7 +27,7 @@ import * as zipkinTypes from '../../types'; */ export function prepareSend(urlStr: string, headers?: Record) { let xhrHeaders: Record; - const useBeacon = navigator.sendBeacon && !headers; + const useBeacon = typeof navigator.sendBeacon === 'function' && !headers; if (headers) { xhrHeaders = { Accept: 'application/json',