@microsoft/applicationinsights-web-basic 3.0.0-beta.2301-18 → 3.0.0-beta.2301-19

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/browser/aib.2.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2301-18
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2301-19
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1550,7 +1550,7 @@
1550
1550
  }
1551
1551
 
1552
1552
  var _objDefineProperty = ObjDefineProperty;
1553
- var version = "3.0.0-beta.2301-18";
1553
+ var version = "3.0.0-beta.2301-19";
1554
1554
  var instanceName = "." + newId(6);
1555
1555
  var _dataUid = 0;
1556
1556
  function _createAccessor(target, prop, value) {
@@ -1770,9 +1770,11 @@
1770
1770
  }
1771
1771
  };
1772
1772
  var checkDynamic = true;
1773
+ var isObjectOrArray = false;
1773
1774
  function _getProperty() {
1774
1775
  if (checkDynamic) {
1775
- if (value && !value[CFG_HANDLER_LINK] && (isPlainObject(value) || isArray(value))) {
1776
+ isObjectOrArray = isObjectOrArray || (value && (isPlainObject(value) || isArray(value)));
1777
+ if (value && !value[CFG_HANDLER_LINK] && isObjectOrArray) {
1776
1778
  value = _makeDynamicObject(state, value);
1777
1779
  }
1778
1780
  checkDynamic = false;
@@ -1793,11 +1795,15 @@
1793
1795
  if (!!_getProperty[state.ro] && !state.upd) {
1794
1796
  throwInvalidAccess("[" + name + "] is read-only:" + dumpObj(theConfig));
1795
1797
  }
1796
- var isReferenced = _getProperty[state.rf];
1797
- if (isPlainObject(value) || isArray(value)) {
1798
+ if (checkDynamic) {
1799
+ isObjectOrArray = isObjectOrArray || (value && (isPlainObject(value) || isArray(value)));
1800
+ checkDynamic = false;
1801
+ }
1802
+ var isReferenced = isObjectOrArray && _getProperty[state.rf];
1803
+ if (isObjectOrArray) {
1798
1804
  if (isReferenced) {
1799
1805
  objForEachKey(value, function (key) {
1800
- value[key] = newValue[key];
1806
+ value[key] = newValue ? newValue[key] : UNDEFINED_VALUE$1;
1801
1807
  });
1802
1808
  objForEachKey(newValue, function (key, theValue) {
1803
1809
  _setDynamicProperty(state, value, key, theValue);
@@ -1814,11 +1820,14 @@
1814
1820
  });
1815
1821
  }
1816
1822
  }
1817
- checkDynamic = false;
1818
- if (!isReferenced && (isPlainObject(newValue) || isArray(newValue))) {
1819
- _makeDynamicObject(state, newValue);
1823
+ if (newValue !== value) {
1824
+ var newIsObjectOrArray = newValue && (isPlainObject(newValue) || isArray(newValue));
1825
+ if (!isReferenced && newIsObjectOrArray) {
1826
+ _makeDynamicObject(state, newValue);
1827
+ }
1828
+ value = newValue;
1829
+ isObjectOrArray = newIsObjectOrArray;
1820
1830
  }
1821
- value = newValue;
1822
1831
  state.add(detail);
1823
1832
  }
1824
1833
  }
@@ -1847,9 +1856,9 @@
1847
1856
  }
1848
1857
  return value;
1849
1858
  }
1850
- function _makeDynamicObject(state, target ) {
1859
+ function _makeDynamicObject(state, target) {
1851
1860
  var _a;
1852
- objForEachKey( target, function (key, value) {
1861
+ objForEachKey(target, function (key, value) {
1853
1862
  _setDynamicProperty(state, target, key, value);
1854
1863
  });
1855
1864
  if (!target[CFG_HANDLER_LINK]) {
@@ -5733,7 +5742,7 @@
5733
5742
  }
5734
5743
  }
5735
5744
  var EnvelopeCreator = {
5736
- Version: "3.0.0-beta.2301-18"
5745
+ Version: "3.0.0-beta.2301-19"
5737
5746
  };
5738
5747
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
5739
5748
  EnvelopeCreatorInit(logger, telemetryItem);