Skip to content

Commit

Permalink
fix(xhr): check for resource timing support (#1720)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfrosty authored Dec 9, 2020
1 parent 91612c4 commit e941f55
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
*/
private _addResourceObserver(xhr: XMLHttpRequest, spanUrl: string) {
const xhrMem = this._xhrMem.get(xhr);
if (!xhrMem || typeof window.PerformanceObserver === 'undefined') {
if (
!xhrMem ||
typeof window.PerformanceObserver === 'undefined' ||
typeof window.PerformanceResourceTiming === 'undefined'
) {
return;
}
xhrMem.createdResources = {
Expand Down

0 comments on commit e941f55

Please sign in to comment.