@adobe/helix-rum-enhancer 1.15.2 → 1.15.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.15.3](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.2...v1.15.3) (2024-04-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * no lcp target text from missing element ([#162](https://github.com/adobe/helix-rum-enhancer/issues/162)) ([1156663](https://github.com/adobe/helix-rum-enhancer/commit/1156663b0b9c7a4caee742d5f9aaf49be358c5cd))
7
+
1
8
  ## [1.15.2](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.1...v1.15.2) (2024-04-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -99,9 +99,9 @@ sampleRUM.drain('cwv', (() => {
99
99
  data.cwv[measurement.name] = measurement.value;
100
100
 
101
101
  if (measurement.name === 'LCP' && measurement.entries.length > 0) {
102
- const { element } = measurement.entries.pop();
103
- data.target = sampleRUM.targetselector(element);
104
- data.source = sampleRUM.sourceselector(element) || element.outerHTML.slice(0, 30);
102
+ const { element: el } = measurement.entries.pop();
103
+ data.target = sampleRUM.targetselector(el);
104
+ data.source = sampleRUM.sourceselector(el) || (el && el.outerHTML.slice(0, 30));
105
105
  }
106
106
 
107
107
  sampleRUM('cwv', data);