Skip to content

Commit ae3a674

Browse files
committed
fix
1 parent b79ccbc commit ae3a674

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/fcl-core/src/events/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function events(filterOrType?: EventFilter | string) {
5050
)
5151
fallbackLegacyPolling()
5252
} else {
53-
onError?.(error)
53+
onError(error)
5454
}
5555
},
5656
})
@@ -67,7 +67,7 @@ export function events(filterOrType?: EventFilter | string) {
6767
unsubscribeFnLegacy = legacyEvents(filterOrType).subscribe(
6868
(event: Event, error?: Error) => {
6969
if (error) {
70-
onError?.(error)
70+
onError(error)
7171
} else {
7272
onData(event)
7373
}
@@ -92,7 +92,7 @@ export function events(filterOrType?: EventFilter | string) {
9292

9393
// Subscribe to events
9494
const initPromise = subscribeToEvents().catch(error => {
95-
onError?.(error)
95+
onError(error)
9696
})
9797

9898
// Return an unsubscribe function

0 commit comments

Comments
 (0)