@adobe/helix-rum-enhancer 2.26.1 → 2.26.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.26.2](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.1...v2.26.2) (2024-12-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * do not process duplicate navigation checkpoints ([#331](https://github.com/adobe/helix-rum-enhancer/issues/331)) ([4b6843f](https://github.com/adobe/helix-rum-enhancer/commit/4b6843f4cbe7b685ffc0c017a46274e505b26b56))
7
+
1
8
  ## [2.26.1](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.0...v2.26.1) (2024-12-10)
2
9
 
3
10
 
package/modules/index.js CHANGED
@@ -145,13 +145,16 @@ function addNavigationTracking() {
145
145
  });
146
146
  };
147
147
 
148
+ const processed = new Set(); // avoid processing duplicate types
148
149
  new PerformanceObserver((list) => list
149
- .getEntries().map((e) => navigate(
150
+ .getEntries()
151
+ .filter(({ type }) => !processed.has(type))
152
+ .map((e) => [e, processed.add(e.type)])
153
+ .map(([e]) => navigate(
150
154
  window.hlx.referrer || document.referrer,
151
155
  e.type,
152
156
  e.redirectCount,
153
- )))
154
- .observe({ type: 'navigation', buffered: true });
157
+ ))).observe({ type: 'navigation', buffered: true });
155
158
  }
156
159
 
157
160
  function addLoadResourceTracking() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "2.26.1",
3
+ "version": "2.26.2",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -293,13 +293,16 @@
293
293
  }
294
294
  });
295
295
  };
296
+ const processed = new Set();
296
297
  new PerformanceObserver((list) => list
297
- .getEntries().map((e) => navigate(
298
+ .getEntries()
299
+ .filter(({ type }) => !processed.has(type))
300
+ .map((e) => [e, processed.add(e.type)])
301
+ .map(([e]) => navigate(
298
302
  window.hlx.referrer || document.referrer,
299
303
  e.type,
300
304
  e.redirectCount,
301
- )))
302
- .observe({ type: 'navigation', buffered: true });
305
+ ))).observe({ type: 'navigation', buffered: true });
303
306
  }
304
307
  function addLoadResourceTracking() {
305
308
  const observer = new PerformanceObserver((list) => {
package/src/index.md5 CHANGED
@@ -1 +1 @@
1
- 9516743215eadcd19f5b5cf311883d16
1
+ b33e2bbaa1ad5542ff6a6343af9750b6