Skip to content

Commit a1b26b0

Browse files
committed
Add check for lcpEntry.element
1 parent 103b283 commit a1b26b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/honeycomb-opentelemetry-web/src/web-vitals-autoinstrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export class WebVitalsInstrumentation extends InstrumentationAbstract {
483483
});
484484

485485
const el: HTMLElement = lcpEntry?.element as HTMLElement;
486-
if (el.dataset) {
486+
if (el?.dataset) {
487487
for (const attrName in el.dataset) {
488488
const attrValue = el.dataset[attrName];
489489
if (

0 commit comments

Comments
 (0)