@pendo/agent 2.302.0 → 2.302.2

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.
package/dist/dom.esm.js CHANGED
@@ -7359,7 +7359,7 @@ function getScreenPosition(element) {
7359
7359
  };
7360
7360
  }
7361
7361
 
7362
- var VERSION = '2.302.0_';
7362
+ var VERSION = '2.302.2_';
7363
7363
 
7364
7364
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7365
7365
 
@@ -3904,8 +3904,8 @@ let SERVER = '';
3904
3904
  let ASSET_HOST = '';
3905
3905
  let ASSET_PATH = '';
3906
3906
  let DESIGNER_SERVER = '';
3907
- let VERSION = '2.302.0_';
3908
- let PACKAGE_VERSION = '2.302.0';
3907
+ let VERSION = '2.302.2_';
3908
+ let PACKAGE_VERSION = '2.302.2';
3909
3909
  let LOADER = 'xhr';
3910
3910
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3911
3911
  /**
@@ -12350,6 +12350,7 @@ const PERFORMANCE_SEND_INTERVAL = 1000 * 60 * 10; // 10 minutes
12350
12350
  class PerformanceMonitor {
12351
12351
  constructor() {
12352
12352
  this._isPerformanceApiAvailable = this._checkPerformanceApi();
12353
+ this._sending = false;
12353
12354
  this._measuringPerformance = false;
12354
12355
  this._debugging = false;
12355
12356
  this._setDebuggingBound = _.bind(this._setDebugging, this);
@@ -12410,7 +12411,7 @@ class PerformanceMonitor {
12410
12411
  return acc;
12411
12412
  }, []);
12412
12413
  this._clearMarksAndMeasures();
12413
- if (_.size(payload)) {
12414
+ if (_.size(payload) && this._sending) {
12414
12415
  writeMetricsPOST(payload);
12415
12416
  }
12416
12417
  }
@@ -12428,6 +12429,9 @@ class PerformanceMonitor {
12428
12429
  _setDebugging() {
12429
12430
  this._debugging = isDebuggingEnabled();
12430
12431
  }
12432
+ _setSending(sending) {
12433
+ this._sending = sending;
12434
+ }
12431
12435
  _markPerformance(name, metadata) {
12432
12436
  if (!this._shouldMeasurePerformance())
12433
12437
  return;
@@ -26795,9 +26799,8 @@ class NetworkRequestIntercept {
26795
26799
  window.fetch = function (...args) {
26796
26800
  return __awaiter(this, void 0, void 0, function* () {
26797
26801
  let [url, config = {}] = args;
26798
- let isRequestObject = false;
26799
- if (_.isObject(args[0])) {
26800
- isRequestObject = true;
26802
+ const isRequestObject = _.isObject(args[0]) && _.isFunction(args[0].clone) && !(args[0] instanceof URL);
26803
+ if (isRequestObject) {
26801
26804
  url = args[0].url;
26802
26805
  // Clone the Request object to avoid consuming the body
26803
26806
  config = args[0].clone();