@cloudcare/browser-core 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,7 +76,7 @@ function afterSend(observable, responsePromise, startContext) {
76
76
  context.error = response;
77
77
  } else if ('status' in response) {
78
78
  context.response = response;
79
- context.responseType = response instanceof Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
79
+ context.responseType = response.constructor === Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
80
80
 
81
81
  context.status = response.status;
82
82
  context.isAborted = false;
@@ -1,6 +1,6 @@
1
1
  import { instrumentMethod } from '../helper/instrumentMethod';
2
2
  import { Observable } from '../helper/observable';
3
- import { elapsed, clocksNow, timeStampNow } from '../helper/tools';
3
+ import { clocksNow } from '../helper/tools';
4
4
  import { normalizeUrl } from '../helper/urlPolyfill';
5
5
  var fetchObservable;
6
6
  export function initFetchObservable() {
@@ -64,7 +64,7 @@ function afterSend(observable, responsePromise, startContext) {
64
64
  context.error = response;
65
65
  } else if ('status' in response) {
66
66
  context.response = response;
67
- context.responseType = response instanceof Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
67
+ context.responseType = response.constructor === Response && response.type || ''; // issue The Response type getter can only be used on instances of Response
68
68
 
69
69
  context.status = response.status;
70
70
  context.isAborted = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcare/browser-core",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "scripts": {
@@ -20,5 +20,5 @@
20
20
  "author": "dataflux",
21
21
  "license": "MIT",
22
22
  "description": "DataFlux RUM Web 端数据指标监控",
23
- "gitHead": "3b02c2cb5c52f6d19f132931e76f75f418f8971a"
23
+ "gitHead": "5947b30c025815387be5a9b869a92d6a75d96069"
24
24
  }
@@ -1,6 +1,6 @@
1
1
  import { instrumentMethod } from '../helper/instrumentMethod'
2
2
  import { Observable } from '../helper/observable'
3
- import { elapsed, clocksNow, timeStampNow } from '../helper/tools'
3
+ import { clocksNow } from '../helper/tools'
4
4
  import { normalizeUrl } from '../helper/urlPolyfill'
5
5
 
6
6
  var fetchObservable
@@ -80,7 +80,7 @@ function afterSend(observable, responsePromise, startContext) {
80
80
  } else if ('status' in response) {
81
81
  context.response = response
82
82
  context.responseType =
83
- (response instanceof Response && response.type) || '' // issue The Response type getter can only be used on instances of Response
83
+ (response.constructor === Response && response.type) || '' // issue The Response type getter can only be used on instances of Response
84
84
  context.status = response.status
85
85
  context.isAborted = false
86
86
  }