Skip to content

Commit d2685cb

Browse files
authored
fix: HandleEvent in breadcrumb integration (#2035)
Fixes #2034
1 parent b8f14ab commit d2685cb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 5.1.1
4+
5+
- [browser] fix: Breadcrumb Integration: Fix #2034
6+
37
## 5.1.0
48

59
- [hub] feat: Add `setContext` on the scope

packages/browser/src/integrations/breadcrumbs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class Breadcrumbs implements Integration {
148148
fn: EventListenerOrEventListenerObject,
149149
options?: boolean | AddEventListenerOptions,
150150
): (eventName: string, fn: EventListenerOrEventListenerObject, capture?: boolean, secure?: boolean) => void {
151-
if ((fn as any).handleEvent) {
151+
if (fn && (fn as any).handleEvent) {
152152
if (eventName === 'click') {
153153
fill(fn, 'handleEvent', function(innerOriginal: () => void): (caughtEvent: Event) => void {
154154
return function(this: any, event: Event): (event: Event) => void {

0 commit comments

Comments
 (0)